Skip to content

added functional component examples with hooks#1623

Merged
nearestnabors merged 3 commits intofacebook:masterfrom
tsawan:text-examples-patch
Feb 24, 2020
Merged

added functional component examples with hooks#1623
nearestnabors merged 3 commits intofacebook:masterfrom
tsawan:text-examples-patch

Conversation

@tsawan
Copy link
Copy Markdown
Contributor

@tsawan tsawan commented Feb 11, 2020

Hi, I've added functional component examples with hooks for Text component. #1579

added functional component examples with hooks
@react-native-bot
Copy link
Copy Markdown

react-native-bot commented Feb 11, 2020

Deploy preview for react-native ready!

Built with commit 2c7d766

https://deploy-preview-1623--react-native.netlify.com

Changes to docs/ are reflected in the next "master" version.

Thank you for your contributions.

How to ContributeDocumentation Sources

@@ -9,7 +9,61 @@ A React component for displaying text.

In the following example, the nested title and body text will inherit the `fontFamily` from `styles.baseText`, but the title provides its own additional styles. The title and body will stack on top of each other on account of the literal newlines:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Simek @rachelnabors @tsawan

Do you think that here we can have examples of how to use each props?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re:

Do you think that here we can have examples of how to use each props?

I'd love to see that in the main example! Is it possible, @tsawan? Perhaps in a follow up submit?

R Nabors added 2 commits February 24, 2020 15:14
Also, I don't think we need class component examples pas the first!
Copy link
Copy Markdown
Contributor

@nearestnabors nearestnabors left a comment

Choose a reason for hiding this comment

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

Thanks for adding these examples! Would totally love to see the main example show off each property in action if you have the chance to do so, but this is plenty good to merge! Rock on!
mlp_thanks-so-much

@nearestnabors nearestnabors merged commit 844db23 into facebook:master Feb 24, 2020
@tsawan
Copy link
Copy Markdown
Contributor Author

tsawan commented Feb 25, 2020

sorry @rachelnabors I was away for a while.
I am not clear what do you mean by "show off each property in action". Please elaborate a bit about properties and I will try to look into it.

I also remember running prettier but I've noticed you prettifying snack example to change it to double quotes. Do you have a different prettier config from the one in repo.?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants