5 ms·
David Nolen had this going for the ClojureScript community about 3 months ago https://www.youtube.com/watch?v=gI3fJKmvgq4 https://www.youtube.com/watch?v=gI3fJK
by coding4all 12y ago
David Nolen had this going for the ClojureScript community about 3 months ago https://www.youtube.com/watch?v=gI3fJKmvgq4 https://www.youtube.com/watch?v=gI3fJKmvgq4
- coderzach 12y agoThis has been around much longer than 3 months.
- coding4all 12y agoI'm just talking about when the video was made/uploaded.
- sbensu 12y agoDon't forget Figwheel, it has been around since April 2014 https://www.youtube.com/watch?v=KZjFVdU8VLI https://www.youtube.com/watch?v=KZjFVdU8VLI https://github.com/bhauman/lein-figwheel https://github.com/bhauman/lein-figwheel
- coding4all 12y agoI'm just talking about when the video was made/uploaded.
- danabramov 12y agoIndeed, this is simpler in ClojureScript world where all state is kept in a single place. It's harder to do the same for JavaScript React components that may have local state, but as you see, it's perfectly possible. Also, as far as I'm aware, ClojureScript hot reloading tools actually unmount the component. This may be OK because state is restored from one source, but it's not as nice-looking because DOM is thrown away on every update, and it flickers.
- coding4all 12y agoWhat? When's the last time you've used Chestnut? Do you have an example I could look at? I ask because it sounds like you're doing something that re-renders the entire application instead of the components that need to update.
- danabramov 12y agoI may be wrong but I don't think Chestnut will patch existing instances? And without patching, I imagine React will recognize new version as a different type and bail out of reconciliation. I didn't try it, just chatted with David on Twitter and that's what I thought. Maybe I got it wrong! Anyway, I'm looking forward to learning more about ClojureScript. A lot of exciting things coming from there.