UPD: it’s now a part of the ES2018
It might be slightly improved via a non-standardised yet properties spread syntax:
return {
...state,
notificationBar: {
...state.notificationBar,
open: true,
},
};
More Related Contents:
- Programmatically Navigate using react-router
- Why do we need middleware for async flow in Redux?
- When to use ES6 class based React components vs. functional ES6 React components?
- React Context vs React Redux, when should I use each one? [closed]
- Why is my onClick being called on render? – React.js
- Await is a reserved word error inside async function
- How to overcome the CORS issue in ReactJS
- How to update single value inside specific array item in redux
- Why use Redux over Facebook Flux? [closed]
- Understanding React-Redux and mapStateToProps()
- Is this the correct way to delete an item using redux?
- Is store.dispatch in Redux synchronous or asynchronous
- Updating nested data in redux store
- Getting an error “A non-serializable value was detected in the state” when using redux toolkit – but NOT with normal redux
- redux fetch body is not use with no cors mode
- What’s the ‘@’ (at symbol) in the Redux @connect decorator?
- How to sync Redux state and url hash tag params
- TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received type undefined raised when starting react app
- How to trigger off callback after updating state in Redux?
- Changing the layout of a component depending on Redux state
- Cannot update a component while rendering a different component warning
- Use Object.assign or Spread Operator in React/Redux? Which is a better practise
- Programmatically change Redux-Form Field value
- having multiple instance of same reusable redux react components on the same page/route
- Update single value in item array | react redux
- How can I dispatch function in redux?
- minimise the code since I am using the same code only the content in p tags changes and component AccordionHeader header changes
- Component won’t update when a redux state change occurs
- Could not find “store” in either the context or props of “Connect(App)”
- How to get simple dispatch from this.props using connect w/ Redux?