stackflow icon indicating copy to clipboard operation
stackflow copied to clipboard

Stackflow doesn't work with plain JavaScript modules

Open cometkim opened this issue 1 year ago • 1 comments

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

cometkim avatar Jun 13 '24 10:06 cometkim

This also results in cycles with some hot-reloaded environments.

XiNiHa avatar Jul 30 '24 08:07 XiNiHa