I
I
Islam Ibakaev2017-05-28 02:08:39
JavaScript
Islam Ibakaev, 2017-05-28 02:08:39

What is the advantage of this plugin over this.state()?

I came across such a plugin
I was interested in this key feature

The render method is never executed immediately. Triggered renders are collected and executed asynchronously in one batch.

What is the benefit of asynchronous render()? And if it's better than react suggests, why didn't they implement it themselves?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Vasiliev, 2017-05-28
@devellopah

This plugin uses a native observable which is not yet available in all browsers as far as I know. That is, it calls the render() or forceUpdate() function when the same observable says.
Look, it's pretty simple: easyState.js
Google: js native observable
Browser support:

  • Node: 6 and above
  • Chrome: 49 and above
  • Firefox: 38 and above
  • Safari: 10 and above
  • Edge: 12 and above
  • Opera: 36 and above
  • React native is not yet supported
  • IE is not supported

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question