daangn / stackflow

🧱 Mobile-first stack navigator framework with composable plugin system
https://stackflow.so
MIT License
704 stars 74 forks source link

Stackflow doesn't work with plain JavaScript modules #470

Open cometkim opened 3 weeks ago

cometkim commented 3 weeks ago

This framework doesn't work with standard JavaScript module semantic because of a circular dependency on required configuration.

For example in the official example, MyActivity.tsx module and stackflow.ts have circular dependency, which will never work with errors like:

Uncaught ReferenceError: Cannot access 'MyActivity' before initialization
    at stackflow.ts:10:5

Or users should use bundlers to inject bundler-specific runtime behavior. That means its behavior is essentially not reliable