3 ms·
tbh how can one NOT use react? it’s insanely simple. is this not the way? https://reagent-project.github.io/ https://reagent-project.github.io/ api basically
by nathants 4y ago
tbh how can one NOT use react? it’s insanely simple. is this not the way?
https://reagent-project.github.io/ https://reagent-project.github.io/
api basically unchanged since 2013 btw.
- Gravyness 4y ago> The goal of Reagent is to make it possible to define arbitrarily complex UIs using just a couple of basic concepts The counting component example is way too complex for me. js/setTimeout? r/atom? What is this wizardly? Is there a reason why this would be preferable, ever?
- nathants 4y agothe basics are: - atom is a compare and swap data structure, its lets you mutate state - in your atom you hold a hashmap, deeply nested, that contains ALL state describing your app - your react components reference that state with: (:some-hashmap-key @state) - every time you update that state, any components depending on it rerender - thats it. it’s literally the best!