Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

tbh how can one NOT use react? it’s insanely simple. is this not the way?

https://reagent-project.github.io/

api basically unchanged since 2013 btw.



> 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?


the 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!




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: