4 ms·
I delived a service in 2019 that was written 100% written in clojure. ReactNative app + SPA Web app + Server all sharing the same code. The developer experienc
by souenzzo 6y ago
I delived a service in 2019 that was written 100% written in clojure. ReactNative app + SPA Web app + Server all sharing the same code.
The developer experience was great. I get subsecond hot-reload on all plataforms (app emulator/app on-device/web/server).
The same UI components was shared between ReactNative and ReactDOM. All App issues are reproducible in Web, then I fix in web and I'm sure that App is working.
Even SSR was possible, with some tweaks.
- deathtrader666 6y agoWhat framework and libraries did you use?
- virtualwhys 6y agoGot a public repo to share that would show how you pulled this off? Barring that, as a sibling comment asks, what specific framework and/or libraries did you use to achieve the holy grail of sharing-all-the-things? (thought ReactNative required implementing separate UI for iOS and Android). Sub second hot reload sounds amazing, btw.
- Jonovono 6y agoNot sure this will help: ClojureScript RN app: (I think has desktop and all that as well) https://github.com/status-im/status-react https://github.com/status-im/status-react
- shoulderfake 6y agoWould love to see a breakdown of your setup for this :)
- eckesicle 6y agoNot OP but to achieve this in clojure you could use something like: For builds and dependency management: Leiningen, boot or deps.edn For the front-end (clojurescript): Shadow-cljs + reagent For the backend (clojure): Nrepl and nrepl.cmdline, Ring, jetty + compojure for a REST API Frontend and backend can share code with .cljc files that work on all clojure dialects. https://clojure.org/guides/reader_conditionals https://clojure.org/guides/reader_conditionals Both nrepl and shadow-cljs support code reloading through the REPL connection. You can compile to a jar file and deploy that, build a docker image, or compile to a native executable with graalvm, or deploy on Aws lambda with Cljs+Lambada. Lots of options.
- shoulderfake 6y agoThank you sir. I am just learning Clojure right now , coming from JS and GO world.