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

expected allow nested effects ? #62

Open
hefeng6500 opened this issue Mar 12, 2022 · 1 comment · May be fixed by #114
Open

expected allow nested effects ? #62

hefeng6500 opened this issue Mar 12, 2022 · 1 comment · May be fixed by #114

Comments

@hefeng6500
Copy link

Hi~ Dear xiaorui, run this follow code got some error

const foo = reactive({
    count: 0,
    name: "cui",
  });

  effect(() => {
    effect(() => {
      console.log("inside effect: ", foo.name);
    });
    console.log("outside effect: ", foo.count);
  });

  foo.count++;

running example code catch an error like this:

Uncaught TypeError: dep is not iterable (cannot read property undefined)

So. expected author add feature to allow nested effects ?

@Rizkavanhouten
Copy link

``

@Jayden12138 Jayden12138 linked a pull request Mar 20, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants