Server vs Client Usage
All utility functions in the Core package are Isomorphic-safe.
This means you can call them safely:
- On the Server: They check for
typeof document === 'undefined'and simply return without error. - On the Client: They execute the DOM logic.
However, for functions that trigger visual changes (Tooast, Theme), calling them on the server has no effect because the native bridge only exists in the client's WebView context.
Best Practice
Always invoke event triggers (Toast, Cart Count) inside client-side event handlers or useEffect hooks.
Next Steps
- Explore Best Practices
- Understand the React Module
- Learn about Integrating Native Framework
