|
|
|
|
|
by adamkl
1932 days ago
|
|
Agree that converting between JS and CLJS data structures is a pain. The best approach to dealing with that is to isolate that interop at the edges of your program. I’m currently, coincidentally, working on a wrapper for Express to do just that. The wrapper library is responsible for mapping between the Express req/res objects to simple ClojureScript maps. Combine that with a similar wrapper around something like fetch or axios and all my code can be pure ClojureScript. I mean, that is the general practice in Clojure/Java land. Write wrappers around the native libraries to isolate the pain that comes from interop. I’m a sucker for Clojure though, and willing to do the work. |
|