Fork me on GitHub
Dustin Paluch03:03:03

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


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


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)


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!


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


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


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


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


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.


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


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


There are no sync network requests in browsers.