-2

Lets say I have some react components on domain-a.com.

From domain-b.com, an applications calls an API endpoint on domain-a.com. This end point returns the .js of the above mentioned react components (bundled). These are then executed on domain-b.com. The react components render a UI and call some end points on domain-a.com.

Is there any CORS issues with domain-b.com running those components on its own domain. I am basically trying to create cross-domain react components and trying to figure out what is the easiest way to go about this without hitting security issues.

1
  • ReactJs is just JavaScript. Look for problems regarding CORS and Javascript and you have your answer. Commented Jul 3, 2018 at 17:43

1 Answer 1

1
  1. Yes, CORS is bound to occur if you are requesting for resources from another origin due to security concerns. Good article to understand - http://restlet.com/company/blog/2015/12/15/understanding-and-using-cors/

  2. other way you can call your backend and let him handle all the heavy lifting. enter image description here

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.