Fork me on GitHub
#clojurescript
<
2022-09-23
>
Ted Ciafardini16:09:12

is there a browser tool that will pprint edn data that’s being sent in network requests?

p-himik19:09:59

Maybe it's Reagent-specific, not sure, but you can write the above as [:a {:class [:group :block :max-w-xs ...]} ...].

andrzejsliwa18:09:49

I know this way of doing it but I was looking something more close to hiccup notation, so I did it in my way: https://clojurians.slack.com/archives/CG3PNFDUJ/p1664112392795999?thread_ts=1663952776.824039&amp;cid=CG3PNFDUJ

Ben Lieberman17:09:58

how do I use js/require as shown here https://clojurescript.org/guides/promise-interop? my code compiles but it says require is not defined

dnolen17:09:39

That is a Node.js example

Ben Lieberman18:09:18

so would that mean i need to do something like

(ns foo.core
(:require [cljs.nodejs :as node]))

(def fs (node/require "fs/promises"))

(def f (.readFile fs "filename"))
and then work with promises bc I don't think this is working either

dnolen18:09:05

If you are not using Node js/require doesn’t exist

dnolen18:09:19

the example is simply demonstrative and has nothing to do w/ Node.js

dnolen18:09:43

If you have an app just follow the convention ignoring the library details which are not important