React Redux: Adding to Arrays

state={title: '',resultCt: 0,searchResults: {},nominations: []}
case 'STORE_NOMINATION':return {...state,nominations: [...state.nominations, action.nominations]}




Software Engineer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Conversion of any String value to ASCII(Hex) and vice versa With JavaScript…

Mocking API Responses in SoapUI to aid Local ReactJS UI Development CORS-free

Make Use of RxJS to Create Efficient React Components With Ease

Tachyons in React Native

NPM’s slow, use PNPM instead

The case for starting with Java over Javascript

The Importance of React’s setState() Method in Class Components

[Action required] Your Trial has Expired — Fri Dec 24 2021

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Lawson Hung

Lawson Hung

Software Engineer

More from Medium

React: “reduce” method

Redux Persist In React Application

Async Nature Of setState() ()

React JS Recap