Closed marbemac closed 4 weeks ago
Yes... I've hit this in the past too. You currently need both the ui-react and ui-react-dom libraries to be the debug version (on the assumption they will be compiled away for prod). I'm not 100% this can be mitigated, but I will have a go.
What is the difference between the debug versions and the regular versions? When using something like Vite to bundle everything up for prod, is there any downside to using the debug versions vs the non debug?
If no downside, then maybe it's just a matter of updating the StoreInspector docs to point out one must use the debug version of ui-react - right now the example shows using the regular ui-react:
Apart from the presence of the inspector it's just that the debug version is not minified. If I can't fix it to be more intuitive, I will do a better job of documenting it, for sure.
Check out the new v5.0.0-beta.21 release: in it, the StoreInspector (now called Inspector) is in its own module that can run in either debug or non-debug mode.
Hoping we can close this out, but please check and re-open if not!
https://beta.tinybase.org/guides/releases/#the-tinybase-inspector
Describe the bug
Getting the
There are no Stores or other objects to inspect. Make sure you placed the StoreInspector inside a Provider component.
message in theStoreInspector
.Pretty sure it's a context mismatch issue. Adjusting my ui-react import to use the debug build (e.g.
import * as UiReact from 'tinybase/debug/ui-react/with-schemas';
fixes the issue (but obviously don't want to ship with this).Looking at the build output of ui-react-dom (
lib/debug/ui-react-dom.js
), it's importing what it needs fromui-react
from./ui-react
(the debug version), so the react context isn't matching up if end user is using non debug ui-react.Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Expected behavior
No response
Screenshots or Videos
No response
Platform
No response
Additional context
No response