We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
given this store:
import { Store } from '@tanstack/react-store'; export const RootState = new Store({ selectedDay: new Date(), });
a is refreshed but b is not
a
b
export function DatePicker() { const a = useStore(RootState); const b = useStore(RootState, (s) => s.selectedDay); // ... }
@thazlett16 said on discord:
I'm guessing this has to do with the shallow compare: https://github.com/TanStack/store/blob/main/packages/react-store/src/index.ts#L34 I know in Redux they generally recommend storing dates in a serializeable format like the string form (RFC 3339, ISO 8601 etc)
I'm guessing this has to do with the shallow compare: https://github.com/TanStack/store/blob/main/packages/react-store/src/index.ts#L34
I know in Redux they generally recommend storing dates in a serializeable format like the string form (RFC 3339, ISO 8601 etc)
example here: https://stackblitz.com/edit/tanstack-store-thn7c7az?file=src%2Findex.tsx
both a and b should refresh (unless dates are not supposed to be supported)
The text was updated successfully, but these errors were encountered:
I’m experiencing the same issue with dates.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
given this store:
a
is refreshed butb
is not@thazlett16 said on discord:
Steps to Reproduce the Bug or Issue
example here: https://stackblitz.com/edit/tanstack-store-thn7c7az?file=src%2Findex.tsx
Expected behavior
both
a
andb
should refresh (unless dates are not supposed to be supported)The text was updated successfully, but these errors were encountered: