remote-react-microapp: fix standalone mode with SyncedRouter fallbackRouter #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/sdk/js/remote-react-microapp-standalone-router"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
pnpm dev:standaloneinsdk/js/examples/remote-react-microapprendered a blank page. Without a NextGraph host there is noReactComponentContext, soSyncedRouterthrew on mount:Fix
Pass
fallbackRoutertoSyncedRouterinApp.tsx:"BrowserRouter"in standalone mode,nullotherwise, asSyncedRouter's own docs recommend. Behaviour when the app is mounted inside a host is unchanged.Testing
Ran
pnpm dev:standaloneand checked http://localhost:5100 in a browser:/switchNot tested inside a NextGraph host (
pnpm dev).🤖 Generated with Claude Code
Thank you for that. Indeed, laurin, the author od SyncedRouter, had documented this issue, and it is better to just fix it for the standalone mode.
One remark: for now the shell is not usable, and I will guide you through on how to integrate your React apps/components with it once it is ready (mid October). Thank you for your patience!