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

FutureBinding compare with React hooks #216

Open
Onesimu opened this issue Sep 22, 2019 · 1 comment
Open

FutureBinding compare with React hooks #216

Onesimu opened this issue Sep 22, 2019 · 1 comment

Comments

@Onesimu
Copy link

Onesimu commented Sep 22, 2019

I find it is similar in code and concept with React hooks and FutureBinding, example:
https://beizhedenglong.github.io/react-hooks-lib/?path=/story/network-usefetch--get-demo
If anyone can compare these two and give some comments?

@Atry
Copy link
Collaborator

Atry commented Feb 1, 2023

React components, including class components and functional components, are unpredictable. They even provided a "strict-mode" to render components twice in order to ensure the developers do not depends on the timing or times to reevaluate a component.

On the other hand, Binding.scala is predictible. Recalculation happens at each .bind call, when the value changes.

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