You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used js-csp in my last project to replace promises (ajax) and frp (search logic).
With webpack + bundle-loader i am able to load components only when needed. webpack makes this very easy.
This component will load the data and the bundle only when needed. Complete example here.
If more components are using data from dataCh or if the same component gets re-mounted to the DOM, the csp solution will fail, because the value will be taken and the AsyncComponent will wait for this never-arriving data.
At this point, csp-promises would be a nice solution.
I ended up loading all data to the immutable datastructure.
I am not happy with this solution because i think that loaded data should not be part of the app-state (in most cases). But i was able to utilize immutable-cursors.
I think that a csp-promise solution would be a competitor for immutable-cursors.
If a channel would return always the last value on every take, and if you could renew the resolved promise value (unlike real promises that could only be resolved once) - would this make immutable-cursors obsolete?
The text was updated successfully, but these errors were encountered:
For the first part, promise-channels would be a nice solution for multiple components that will read from a single channel.
Maybe i am asking for observables, when it comes to "renewable" promise-channels. Because of "first value written wins", it would only make sense to use promise-channels if the receiver would wait for a new promise after the first resolved value is taken.
I used js-csp in my last project to replace promises (ajax) and frp (search logic).
With webpack + bundle-loader i am able to load components only when needed. webpack makes this very easy.
This component will load the data and the bundle only when needed. Complete example here.
If more components are using data from dataCh or if the same component gets re-mounted to the DOM, the csp solution will fail, because the value will be taken and the AsyncComponent will wait for this never-arriving data.
At this point, csp-promises would be a nice solution.
I ended up loading all data to the immutable datastructure.
I am not happy with this solution because i think that loaded data should not be part of the app-state (in most cases). But i was able to utilize immutable-cursors.
I think that a csp-promise solution would be a competitor for immutable-cursors.
If a channel would return always the last value on every take, and if you could renew the resolved promise value (unlike real promises that could only be resolved once) - would this make immutable-cursors obsolete?
The text was updated successfully, but these errors were encountered: