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

[Question] nested procs #447

Closed
ShaMan123 opened this issue Oct 30, 2019 · 3 comments
Closed

[Question] nested procs #447

ShaMan123 opened this issue Oct 30, 2019 · 3 comments

Comments

@ShaMan123
Copy link
Contributor

ShaMan123 commented Oct 30, 2019

It's a bit unclear in the docs if one can nest a proc inside the other.

const procA = proc((a, b)=>multiply(a, b))
const nestedProc = proc((a, b, c)=>add(c, procA(a, b)))

I tried it and some strange things happened, but I'm not sure what's the root cause (#354 | #417 )

@osdnk
Copy link
Contributor

osdnk commented Oct 30, 2019

Basically it should work ¯_(ツ)_/¯

@ShaMan123
Copy link
Contributor Author

hmmm...
I'm not sure what's the problem but could it be memozation?
If I don't nest procs the problem seems to resolve.
However I'm not even sure this is true because I believe that Fast Refresh doesn't play nicely with reanimated. Nodes become unresponsive as if they've detached, some stop updating.
What about procs and Fast Refresh? Do procs get reinitialized while the app updates in __DEV__ mode? This is desirable.

@ShaMan123
Copy link
Contributor Author

It works.
The problem was caused by #417

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