You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi everyone, i have a problem.
i want to send some objects to actions before component render. how can i do that ?
my currently solution: <Button onClick={actions.bind(null, data)} label="OK"/>
but this i have to bind each action on my component, that's too bad.
how can i bind data object to all actions in once?
thanks so much !
The text was updated successfully, but these errors were encountered:
I believe you need a container component to link actions down to presentational components. I've found it pretty consistent to have a related container component for practically every single presentation component that needs to manage a state or link up an action. Then, you pass the actions as props using useDeps. It seems like overkill in theory, but in practice just about all of the container components are needed to properly manage the data aspect of the components.
hi everyone, i have a problem.
i want to send some objects to actions before component render. how can i do that ?
my currently solution:
<Button onClick={actions.bind(null, data)} label="OK"/>
but this i have to bind each action on my component, that's too bad.
how can i bind data object to all actions in once?
thanks so much !
The text was updated successfully, but these errors were encountered: