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
Since subsequent messages of a live stream are meant to be folded into the state (the first message), they are relatively useless without the original reduce function used to construct the flumeview. I don't see an easy way to get at that. For instance, if I'm using a 3rd-party lib like ssb-about that doesn't export its reducer, I'd have to copy and paste the reduce function if I wanted to use a live stream of that flumeview.
If there is already an easy way to get at the reducer, let me know. Otherwise how can we make this easy without requiring plugin authors to export their reduce function explicitly? I guess it's not so simple to "send a function over the wire" to the client...
The text was updated successfully, but these errors were encountered:
correct. really, the right answer is for flumeview-reduce users to put their reduce functions in a standalone file, then load them: FlumeView(1, require('./reduce')... then the same reduce function can be brought into the browser bundle.
Fortunately there isn't a way to export a closure (given that it might have references to modules etc) as that would probably invite developers to be too clever.
yeah, you could just stringify a function and eval it on the client, but it would break if they had any outside references to modules. put it in it's own module is the easy way.
Since subsequent messages of a live stream are meant to be folded into the state (the first message), they are relatively useless without the original
reduce
function used to construct the flumeview. I don't see an easy way to get at that. For instance, if I'm using a 3rd-party lib likessb-about
that doesn't export its reducer, I'd have to copy and paste the reduce function if I wanted to use a live stream of that flumeview.If there is already an easy way to get at the reducer, let me know. Otherwise how can we make this easy without requiring plugin authors to export their reduce function explicitly? I guess it's not so simple to "send a function over the wire" to the client...
The text was updated successfully, but these errors were encountered: