I'm using the /with-schemas' imports to have typed functions based on my Store schema everywhere. I noticed that for the React UI hooks likeimport { useCreatePersister, useCreateStore } from "tinybase/ui-react";` there don't seem to be variants that support typed stores.
So now when I e.g. call useCreatePersister() with my typed Store, the types don't match and I have to do useCreatePersister(typedStore as Store) do avoid TS complaining.
Is this intentional, or did I just overlook something?
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
No response
Expected behavior
Importing from e.g. import { useCreatePersister } from "tinybase/ui-react"; should provide a useCreatePersister function that accepts a typed store (Store<[TablesSchema, ValuesSchema]>) as a parameter.
Describe the bug
Sorry for opening two issues in a row 😅
I'm using the
/with-schemas' imports to have typed functions based on my Store schema everywhere. I noticed that for the React UI hooks like
import { useCreatePersister, useCreateStore } from "tinybase/ui-react";` there don't seem to be variants that support typed stores.So now when I e.g. call useCreatePersister() with my typed Store, the types don't match and I have to do useCreatePersister(typedStore as Store) do avoid TS complaining.
Is this intentional, or did I just overlook something?
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
No response
Expected behavior
Importing from e.g.
import { useCreatePersister } from "tinybase/ui-react";
should provide a useCreatePersister function that accepts a typed store (Store<[TablesSchema, ValuesSchema]>
) as a parameter.Screenshots or Videos
No response
Platform
Additional context
No response