setStore with partial application
Hello, I've recently started using
createStore
a bit and have a question (coming from a functional programming background).
I have a setup that is basically a store of an object containing an array, and I want to pass a setter for the array specifically to a child component. Consider this snippet:
As you can see I am trying to use partial application to create a setter for a property of my store, in order to use that with all its SetStoreFunction
advantages. Is such a thing supported or do I need to build a workaround for this usecase?
As a sidenote, is it fine to pass store and setStore to a child component to update my state or is that not recommended?
Thanks, have a good one2 Replies