Image & View: add snack examples to use functional components#1582
Image & View: add snack examples to use functional components#1582nearestnabors merged 10 commits intofacebook:masterfrom amandeepmittal:master
Conversation
|
Deploy preview for react-native ready! Built with commit 743fd2d https://deploy-preview-1582--react-native.netlify.com Changes to Thank you for your contributions. |
|
Few semicolons are missing mainly after |
|
@amandeepmittal can you make the changes @Simek suggested? |
nearestnabors
left a comment
There was a problem hiding this comment.
Please follow @Simek's suggestions! #1582 (comment) Thank you both!
|
Oh, my apologies to both of you @rachelnabors and @Simek but I missed the notifications. 🙏 |
arrow functions over function keyword
|
Hey @Simek I have made changes as you suggested. Couldn't find any missing semi colons, also, I am using the same prettier config as the repo states. |
| </View> | ||
| ); | ||
| } | ||
| } |
| @@ -61,8 +188,14 @@ export default class DisplayAnImageWithStyle extends Component { | |||
| ); | |||
| } | |||
| } | |||
docs/view.md
Outdated
| <Text>Hello World!</Text> | ||
| </View> | ||
| ); | ||
| } |
docs/view.md
Outdated
| import React from 'react'; | ||
| import { View, Text } from 'react-native'; | ||
|
|
||
| const ViewBoxesWithColorAndText= () => { |
Ran code through prettier
Fixing a problem with code md
|
Sorry about that @Simek I thought the prettier config of the repo was handling it. Thank you @rachelnabors for this opportunity. |
|
@amandeepmittal No problem, thank you for the contribution! 😄 |
…ok#1582) * convert examples to use functions * Update image.md * Removing first and final ``` * Removing first and final ``` from second code snippet * View: add snack + functional component example * arrow functions over function keyword * Image: arrow functions and extracted styles * Update view.md Ran code through prettier * Update image.md Fixing a problem with code md Co-authored-by: Rachel Nabors <rachelnabors@users.noreply.github.com>
In Reference to #1579
This PR adds a Snack Example for
<Image/>component with a use case for a functional component.