Why I need to add curly braces to the action creater in React + Redux?

Action creators: export const addTodoCustom = function (text) { return { type: “ADD_TODO”, id: nextTodoId++, text }; }; Right statement: import * as actions from “../actions” import AddTodo from “../components/AddTodo”; import {bindActionCreators} from “redux”; import {addTodoCustom} from “../actions”; export default connect(mapStateToProps, {addTodoCustom})(AddTodo); Wrong statement: export default connect(mapStateToProps, addTodoCustom)(AddTodo); Why I need to add curly braces…

Details

onClick event in react js select child of the elements that exist in the inner component not parent itself

When I click on the div that includes the AnimatedMouse component the event that logged in the console is one of the elements of AnimatedMouse component not the div with className “animated-mouse” itself. const AnimatedMouseScroll = () => { return ( <div class=”scroll-msg-container”> <div class=”scroll-msg-inner” > <div class= “scroll-msg-wheel” > click here </div> </div> </div>…

Details