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
I would like to suggest an enhancement for the withArraySelector function. Currently, it allows selecting state slices using an array of keys. However, it would be incredibly useful if it could also support dot-separated paths for nested state selection.
Use Case:
In many applications, state can be nested deeply. Using dot-separated paths would simplify the selection of nested state slices and improve code readability. For example:
I would like to suggest an enhancement for the withArraySelector function. Currently, it allows selecting state slices using an array of keys. However, it would be incredibly useful if it could also support dot-separated paths for nested state selection.
Use Case:
In many applications, state can be nested deeply. Using dot-separated paths would simplify the selection of nested state slices and improve code readability. For example:
const useStoreWithArray = withArraySelector(useExampleStore);
Current method:
const { nestedState } = useStoreWithArray(['nestedState']);
Proposed method:
const { deeplyNestedState } = useStoreWithArray(['nested.state.path']);
The text was updated successfully, but these errors were encountered: