skip to Main Content

How to test a react app on different devices when there are warnings in the terminal?

I want to test out my recat app on my mobile phone but the URL in the terminal is hidden by warnings instead.

Is there any way that i can ignore and disable these warnings and reaveal the URL that can be used to launch react app on my phone?

enter image description here

2

Answers


  1. Chosen as BEST ANSWER

    the warnings were thrown by Eslint extension in visual studio code, it can be disabled by disabling the eslint from the extensions tab.

    Thank you everyone who took time to answer the question, I appreciate it :)


  2. You can stop displaying warning this way:

    Modify the "start" script to include the –no-warnings flag in the package.json file like this:

    "scripts": {
      "start": "react-scripts start --no-warnings"
    }
    

    Save the package.json file and re-run React app using "npm run start" command.

    Let me know, if you have doubts.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search