-
In the store I have
then in the component setter I have:
Does it really populate Should I create a method in the store to populate the property? How would I do it with a parameter? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think it does. Does it not?
It's up to you. Both styles work: https://github.com/pmndrs/zustand/wiki/Practice-with-no-store-actions
You can create a function or a method to take a parameter. export const setColumnState = (columnState) => {
useGridStore.setState({ columnsState })
} Or, you mean something else. |
Beta Was this translation helpful? Give feedback.
I think it does. Does it not?
It's up to you. Both styles work: https://github.com/pmndrs/zustand/wiki/Practice-with-no-store-actions
You can create a function or a method to take a parameter.
Or, you mean something else.