Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
inside opened this issue Feb 14, 2017 · 3 comments
Labels

Comments

@inside
Copy link

inside commented Feb 14, 2017

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
Copy link
Member

dlmr commented Feb 15, 2017

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.

@dlmr dlmr added the question label Feb 15, 2017
@inside
Copy link
Author

inside commented Feb 15, 2017

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

@inside
Copy link
Author

inside commented Feb 15, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants