3 ms·
> 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
by 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!