U
U
Username2019-05-19 18:40:53
React Native
Username, 2019-05-19 18:40:53

Where to put API paths in React Native?

Good afternoon!
There are paths to the prodaction & development server.
Where can I put them in React Native, so that in the master there is a path to prod, and in develop to development?
In ios, they put this matter into targets, but how are things in react native?
What approach do you use or could you advise

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir, 2019-05-19
@Casufi

As an option - https://facebook.github.io/create-react-app/docs/a...
in package.json you prescribe the script build and build:prod you prescribe variables in them

D
davidnum95, 2019-05-20
@davidnum95

You need to look towards the Environment configuration, for example this is https://medium.com/@peterpme/environment-variables...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question