Fork me on GitHub
#re-frame
<
2022-03-21
>
Dustin Paluch03:03:03

hiccup is in clj, but re-frame can process hiccup. is re-frame using some cljs port of hiccup?

mikethompson03:03:49

re-frame doesn't process hiccup. Instead it works in with Reagent. Indeed, the name re-frame is short for "Reagent framework".

mikethompson03:03:25

Just to be clear. You can use Reagent by itself without re-frame. Reagent is a layer over React. re-frame provides a framework for using Reagent (because IMO Reagent isn't enough)

mikethompson03:03:11

This may help to further explain the relationship ...

Dustin Paluch03:03:50

ah, and reagent uses “hiccup-like” markup according to the readme. I see. Thanks!

popeye19:03:20

I am getting below error has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' when calling different service end points, How can we fix this error? I was referring few docs https://medium.com/coinmonks/how-to-fix-cors-web-server-error-6c2c55938f95

p-himik19:03:46

You fix CORS errors on the server, not on the client. Not related to re-frame at all.

popeye19:03:23

oh, I am using figwheel, how can fix that/

p-himik19:03:24

Uhm... Figwheel is a build tool. It's completely orthogonal to the topic.

p-himik19:03:36

Have you read the above Medium article in full?

Daniel Craig16:03:00

This question makes you take a step back and learn before moving forward again 😞 I've been through the same thing

Daniel Craig16:03:48

Are the requests that are getting CORS errors attempting to reach a backend service that you own?

Daniel Craig16:03:43

try reading up on reverse proxying - for example, I have a re-frame app running on nginx and a graphql endpoint running apart from that. I got CORS errors when I tried to hit the graphql endpoint directly from my re-frame app because I was requesting something from somewhere other than the same place that the app was served from. When I made a new /graphql endpoint that proxied my request to the graphql service running apart in its own silo, the CORS rules were satisfied because my page was only requesting resources that came from its origin.

popeye20:03:49

How to handle sync call in reframe? any suggestion or docs to refer?

p-himik20:03:26

By "call", do you mean a network request?

p-himik07:03:12

There are no sync network requests in browsers.