0

I have an application and I have 2 screen. Let's call them 1 and 2. What I want to do is that when I run the app like so: yarn start I will show screen 1 and when I run SOMETHING yarn start it will show screen 2. To way I handle the actual viewing of the screen is not the problem. I am just trying to understand how to tell my app to know that SOMETHING is defined. What I mean is that for example:

return process.env.SOMETHING ? <div>2</div>: <div>1</div>;

I am guessing that I should use an env variable here but I am not sure. How can I tell my app that the SOMETHING variable was defined when I ran the app so show screen 2 instead of 1. Is there a way of doing this without webpack? Thanks

Contentop
  • 1,163
  • 3
  • 20
  • 43

0 Answers0