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
[flow] add examples/create-react-app-with-flow #8449
Conversation
@@ -0,0 +1,35 @@ | |||
# Create React App example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we update the name here?
|
||
## The idea behind the example | ||
|
||
[Create React App](https://github.com/facebookincubator/create-react-app) with no build configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we say it's about adding flow to Material-UI?
"dependencies": { | ||
"jss": "^8.1.0", | ||
"jss-preset-default": "^3.0.0", | ||
"material-ui": "1.0.0-beta.12", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use "next"?
"material-ui": "1.0.0-beta.12", | ||
"prop-types": "^15.6.0", | ||
"react": "^16.0.0", | ||
"react-dom": "^16.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use "latest"?
"jss-preset-default": "^3.0.0", | ||
"material-ui": "1.0.0-beta.12", | ||
"prop-types": "^15.6.0", | ||
"react": "^16.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use "latest"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot if we want the from scratch
to work. flow-typed install
will fail.
open: boolean, | ||
}; | ||
|
||
class Index extends Component<DefaultProps & Props, State> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a complex example for this one? Maybe a simple Button is enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be preferable to have something exactly the same as the other without flow. That way differences are notable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seriously, a small tutorial explaining the diffs shold be the enough. I did't understood, there is other stuffs (jss, recompose, etc.) disrupting the example. And I couldn't find what was the exactly thing needed to do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joseneto-fixeads to each his own. BTW - we are dropping flow support as we speak. If you are starting out, please consider typescript. More information in #9312
@oliviertassinari feel free to edit anything, I just wanted to make flow work. If we want the |
8e34fd8
to
84d8738
Compare
@rosskevin I have added a flow page in the guide section of the docs. Good job :) |
Add a sample, relates to #8073