4 ms·
Nice work! I've also done a similar thing (https://github.com/rstacruz/onmount https://github.com/rstacruz/onmount), and it's really useful in managing behavior
by rstacruz 9y ago
Nice work! I've also done a similar thing (https://github.com/rstacruz/onmount https://github.com/rstacruz/onmount), and it's really useful in managing behaviors in a page.
For those wondering what this is for, I've written a document with guidelines in building scalable non-SPA apps leveraging this: http://ricostacruz.com/rsjs http://ricostacruz.com/rsjs
- skrebbel 9y agoWow, rsjs is really neat! Thanks! Totally going to use that on our dashboard.
- aoeusnth1 9y agoRsjs looks pretty great, thanks.
- Lord_Zero 9y agoIs it just me or do these approaches seem hacky? If you were using something like Angular or React wouldn't you plug into lifcycle events that are exposed by the library like Abgular's OnInit?
- rstacruz 9y agoif you were using something like Angular or React to manage your full page, then by all means run with it! RSJS is an alternative to that that's more suited for "traditional" sites rendered on the server (eg, traditional Rails and Rails-like setups).