Skip to content

Stackflow doesn't work with plain JavaScript modules #470

Open

Description

@cometkim

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

Activity

  1. changed the title [-]Never work with JavaScript modules[/-] [+]Stackflow dosn't work with plain JavaScript modules[/+] on Jun 13, 2024
  2. changed the title [-]Stackflow dosn't work with plain JavaScript modules[/-] [+]Stackflow doesn't work with plain JavaScript modules[/+] on Jun 13, 2024
  3. XiNiHa commented on Jul 30, 2024

    @XiNiHa
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions