Fork me on GitHub
#clojurescript
<
2023-06-04
>
scknkkrer14:06:08

Guys it might be a silly question, but if I wanna use re-frame http-fx library, the :response-format is mendatory. But I don’t wanna use JSON format, I communicate in EDN. Is there any documentation or something I can read and write my own format-ter function if there is no any other?

p-himik14:06:12

Of course, I'd suggest looking at the implementation of ajax/json-response-format - it's very straightforward. Not entirely related, but unless you really have to use EDN, I would suggest using Transit. You end up with the same EDN but different things get sent over the wire, and the protocol is faster due to its reliance on JSON (or Msgpack).

scknkkrer14:06:22

Yeah, I was looking for it. Also, I don’t have any preferences, yet. I might wanna test it after the MVP implementation.

p-himik14:06:28

Oh, actually seems like you can simply require ajax.edn and then use ajax.edn/edn-response-format. But I'd still recommend using Transit.

scknkkrer14:06:54

Can you link the project, please. I’m not sure but for a quite time, google is giving the strange results.

p-himik14:06:53

It's right in the README of the http-fx library - the reference to cljs-ajax.

p-himik14:06:29

Google becomes crappier and crappier day by day, but official docs and source code never fail. :)

scknkkrer17:06:50

Yeah. I believe it had a nature but they are changing it harshly to catch the new era. Or, I just got bad with new internet content and can’t align my search texts with the content I wanna find. 😂

scknkkrer18:06:51

Thank you for your help, it worked! 😇

👍 1
scknkkrer19:06:48

What do you guys think about using the react-router with Ionic v7 on React instead of bidi or other clojure-ish tools? Pushy + Bidi looks convincing but will I lose any functionality of Ionic?

p-himik19:06:35

It sounds like a question for Ionic folk since the answer depends on whether or not react-router is an integral part of the framework.