They're not... they're using ClojureScript _with_ React. React is a library, not a language (JSX is not React - JSX is a language and tool which ships "with" / alongside React). That said, one would choose ClojureScript over JSX + JavaScript if they preferred the ClojureScript language and available tools and libraries, and felt confident enough that they could create abstractions in ClojureScript as powerful or moreso than what JSX provides.
I am a Next.js dev myself and want to learn a functional language because I am sick of all these front-end runtime exceptions. I need a sense of security when developing but not at the expense of productivity. Hence languages like ClojureScript seem perfect for people like me
TLDR: Do not try this at home.
Why would anyone choose clojurescript over react ?
Most of the time they work together, clojurescript is not meant to replace react
They're not... they're using ClojureScript _with_ React. React is a library, not a language (JSX is not React - JSX is a language and tool which ships "with" / alongside React).
That said, one would choose ClojureScript over JSX + JavaScript if they preferred the ClojureScript language and available tools and libraries, and felt confident enough that they could create abstractions in ClojureScript as powerful or moreso than what JSX provides.
I am a Next.js dev myself and want to learn a functional language because I am sick of all these front-end runtime exceptions. I need a sense of security when developing but not at the expense of productivity.
Hence languages like ClojureScript seem perfect for people like me