• Resolved trisystema

    (@trisystema)


    Hi,

    I’ve used Your plugin in order to create a react app. Now, I’d need to connect to the external API using the useEffect hook. As I can’t find a simple alternative for enviroment variables, I’ve just hardcoded the API’s link in the app. When I go to the reactpress app page and inspect the code, I cannot find the API’s link (even though it works). Can it be concluded that that practice is not unsafe? In the negative case, what would be the simplest workaround?

    Cheers and thanks in advance

Viewing 1 replies (of 1 total)
  • Plugin Author rockiger

    (@rockiger)

    I am not sure if I understand the question right. Why would you keep your API link secret? A quick look into the developer tools will show them.

    Having said that, with ReactPress you use a standard create-react-app. You have access to environment variable like with any other React project.

Viewing 1 replies (of 1 total)
  • The topic ‘Security of useEffect?’ is closed to new replies.