Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stackflow doesn't work with plain JavaScript modules #470

Open
cometkim opened this issue Jun 13, 2024 · 1 comment
Open

Stackflow doesn't work with plain JavaScript modules #470

cometkim opened this issue Jun 13, 2024 · 1 comment

Comments

@cometkim
Copy link
Member

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 cometkim changed the title Never work with JavaScript modules Stackflow dosn't work with plain JavaScript modules Jun 13, 2024
@cometkim cometkim changed the title Stackflow dosn't work with plain JavaScript modules Stackflow doesn't work with plain JavaScript modules Jun 13, 2024
@XiNiHa
Copy link
Contributor

XiNiHa commented Jul 30, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants