finos / openfin-react-hooks

A collection of React Hooks built on top of the Openfin API - from Scott Logic
Apache License 2.0
48 stars 18 forks source link

React cross-origin error when using InterApplicationBus hook #29

Open darrenfurr opened 5 years ago

darrenfurr commented 5 years ago

During development, I found that if you do not use the correct Identity (I was just using a string) you will receive a cross-origin error in react development mode.

Example: Inside my component:

const { data, isSubscribed } = useInterApplicationBusSubscribe("test-identity", "test-topic");

Then when I launch the app (see attached). Interestingly enough, when I converted the hook to use the v1 api (window.fin.desktop.) the cross origin error went away (course the Identity was wrong so it didn't work anyway).

Just thought I would pass this along. -Darren Screen Shot 2019-10-28 at 2 22 30 PM