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

[flow] add examples/create-react-app-with-flow #8449

Merged
merged 1 commit into from Sep 30, 2017

Conversation

rosskevin
Copy link
Member

Add a sample, relates to #8073

@rosskevin rosskevin added docs Improvements or additions to the documentation flow labels Sep 28, 2017
@@ -0,0 +1,35 @@
# Create React App example
Copy link
Member

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

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

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

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use "latest"?

Copy link
Member Author

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

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.

Copy link
Member Author

@rosskevin rosskevin Sep 29, 2017

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

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

Copy link
Member Author

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

@rosskevin
Copy link
Member Author

@oliviertassinari feel free to edit anything, I just wanted to make flow work.

If we want the from scratch instructions to work, we must specify versions so that flow-typed install will succeed.

@oliviertassinari oliviertassinari self-assigned this Sep 29, 2017
@oliviertassinari
Copy link
Member

oliviertassinari commented Sep 30, 2017

@rosskevin I have added a flow page in the guide section of the docs. Good job :)

@oliviertassinari oliviertassinari merged commit ac41bf0 into mui:v1-beta Sep 30, 2017
@rosskevin rosskevin deleted the flow-example branch September 30, 2017 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants