invisible-college / statebus

All aboard the STATEBUS!!!
117 stars 5 forks source link

Does a statebus implementation require "eval"? #47

Open floer32 opened 3 years ago

floer32 commented 3 years ago

The current codebase has some eval (and dynamically evaluated CoffeeScript). I started playing with the code to see if I could remove the need for this. Is that misguided — is there no way around it?

toomim commented 3 years ago

No no, it doesn't require coffeescript or eval. Those are just a set of handy routines in client.js that you can use if you want. But you can totally ignore them, and in fact you can completely ignore client.js if you want. That stuff is all built on the inner statebus.js code.

You can think of client.js and server.js as "a collection of common ways to use statebus.js." The client.js code shows you how to integrate it really nicely with React and even Coffeescript over a network, but you can ignore it if you want to get lower-level.

More info at https://github.com/invisible-college/statebus/issues/46

floer32 commented 3 years ago

You can think of client.js and server.js as "a collection of common ways to use statebus.js."

Good sentence to add to the quickstart, maybe?