score:1
i like that you try to find your own solutions to your specific problems. it's the sign of an engineer, just in this case this isn't the solution.
i think the idea of how redux teaches you to do things is not intended to be canonized. you have the ability to put a dispatcher on your props because it allows things to be transparent, meaning that things are bound outside of your class and injected in. you have hidden your store dependency by directly referencing it in some other files. it's no longer as obvious how your application works with regards to the workflow. another react developer would be confused, i suppose that's the major downside.
if you're ok with those aspects what you're doing is fine. fine as in, it gets the job done, but not "fine" in that it embraces concepts like single responsibility principle
Source: stackoverflow.com
Related Query
- Why not dispatch directly into store from action creator redux?
- Why is this variable from the Redux store not in the `this.props` on React page?
- dispatch action triggering, but redux store not updating
- Redux Thunk + ReactJS: Action creator being called but dispatch function not being called
- React Redux action not entering into dispatch
- Dispatch action from redux store in non redux component
- Why redux store only get value of last dispatch Action
- How do i dispatch a redux action from class and not component
- How to dispatch Redux action from stateless component when route is loaded?
- redux action "is not a function" when dispatched from component
- React Redux : Action creator not calling reducer
- Redux ToolKit: is it possible to dispatch other actions from the same slice in one action created by createAsyncThunk
- Redux - how to call an action creator from inside another action creator?
- Redux Toolkit: Dispatch an action from an extraReducers listener?
- Redux action dispatch not working
- Is it common practice to grab store data from an action creator in flux?
- Why Redux returns old state when dispatch action before?
- Why is Redux passing dispatch into the return function of an action?
- Dispatch is not a function when testing a redux action
- Redux thunk not resolving before next action + then is not a function or dispatch undefined
- Dispatch async redux action from non-react component with thunk middleware
- react-admin: dispatch action to store meta data from dynamic request
- How to access redux store from action creator?
- Redux store not update after dispatch
- Loading Data from MongoDB into Redux Store fetching from my node API
- Using React and Redux Hooks, why is my action not firing?
- How to take parameters from component to redux action creator
- React Hooks and Redux - trouble getting value from action creator
- Redux Thunk Action Creator Not Getting Called
- How to access async function from Redux Action passed into Redux Thunk?
More Query from same tag
- Json Data not rendering in ReactJS class after setting its state through axios library method?
- React-hook-form input type value won't work
- Using state in method - React
- Having problem in data mapping in react redux?
- how can I unit test an output of HTML code
- React BrowserRouter only load the NavBar
- React/TypeScript: Creating a unified "notification" function that ties to a single component
- How can I store multiple data in state using spread operator
- Creating an animation for a basic React slot machine
- How to add an element (not a tab) to the tab bar?
- Apply CSS styling to a mapped item
- TypeError: prevUserFavourites.concat is not a function
- ESLint rule for Object & array dependencies in the React useEffect Hook
- AWS App Sync Subscriptions not working because of MQTT error
- is the useState's setter guaranteed to be the same?
- Material UI select multiple dates with Calendar
- How to Avoid Infinite Re-Rendering Loop When You Have to Set State in Render()?
- How to hide/show elements at certain breakpoints with Material UI?
- Custom datepicker on cell edit with ag-grid
- React Selectable Fast: how to set and get checked items from a list of selectable items
- How to use global var in react?
- React conditional rendering causes multiple api calls
- Add sass loader to the webpack already using react
- How to call a function if Current position within Polygon in google-,maps-react?
- How to fix post data that return NaN for type numbrer and don't return value for string type in mongodb?
- Why getting too many rerenders in react?
- Update state in class from const
- Mobx does not rerender after an item in observable array has changed
- React-router: Using <Link> as clickable data table row
- Score 100 on Google PageSpeed Insights using Meteor (ie. a web-app landing page)