zustand-pick transformer does not support default value assignment
Closed this issue · 4 comments
KrishnapriyaSkk commented
Below syntax with default value assignment, doesn't seem to be allowed by zustand-pick
tranformer currently:
const {
solution = {},
packages = null,
} = useConfigStore.pick();
cc: @Amaljith-K
Amaljith-K commented
@ajmaln _a I forgot whether renaming of variables would work:
const { id: userId } = useUserStore.pick();
If it doesn't work either, please add support for it too.
KrishnapriyaSkk commented
const { id: userId } = useUserStore.pick();
@Amaljith-K This case works just fine.
ajmaln commented
@Calvinwilson99 _a