rocjs / roc

🐦 Modern JavaScript Development Ecosystem
MIT License
425 stars 23 forks source link

PropTypes as Flow types, Failed prop type warning only reported in the terminal #161

Open inside opened 7 years ago

inside commented 7 years ago

Hi,

I'm using the roc-package-web-app-react v1.0.0-beta.9. I have installed babel-plugin-flow-react-proptypes v0.21.0 and have this in my package.json:

  "babel": {
    "env": {
      "development": {
        "plugins": [
          "flow-react-proptypes"
        ]
      }
    }
  }

In the following screenshot, I use PropTypes as Flow types and the warning only appears in the terminal.

proptypes-as-flowtypes-no-browser-warning

But in that screenshot, I use react PropTypes and I am warned both in the terminal and in the browser viewport and console.

react-proptypes-with-a-browser-warning

Is it possible to use PropTypes as Flow types and be warned both in the terminal and browser?

Thanks for your input. Best,

dlmr commented 7 years ago

I will look into this and get back to you but it might help to use https://www.npmjs.com/package/roc-plugin-flow to get a tighter integration.

inside commented 7 years ago

Thanks, I'll install the flow plugin. I'll let you know if it gets better.

inside commented 7 years ago

It is the same behavior, except the terminal warnings appear on both cases only when roc dev launches the browser. Further browser refreshes don't show the terminal warning.