Binding.scala icon indicating copy to clipboard operation
Binding.scala copied to clipboard

FutureBinding compare with React hooks

Open Onesimu opened this issue 6 years ago • 1 comments

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?

Onesimu avatar Sep 22 '19 00:09 Onesimu

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.

Atry avatar Feb 01 '23 05:02 Atry