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

Update tutorial.md #2546

Merged
merged 3 commits into from Mar 20, 2021
Merged

Update tutorial.md #2546

merged 3 commits into from Mar 20, 2021

Conversation

HughRdgz
Copy link
Contributor

Changed this.props.{NAME} by {this.props.NAME}

Changed this.props.{NAME} by {this.props.NAME}
@facebook-github-bot
Copy link

Hi @HughRdgz!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@netlify
Copy link

netlify bot commented Mar 16, 2021

Deploy preview for react-native ready!

Built with commit e519d37

https://deploy-preview-2546--react-native.netlify.app

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

Copy link
Collaborator

@Simek Simek left a comment

Choose a reason for hiding this comment

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

Hi @HughRdgz, can you explain why you want to change this note? Currently inline code in there looks fine to me. {NAME} is referring to the user defined prop, used here as placeholder, the rest of chain should remain unchanged no matter which name has been chosen.

@HughRdgz
Copy link
Contributor Author

Hi @HughRdgz, can you explain why you want to change this note? Currently inline code in there looks fine to me. {NAME} is referring to the user defined prop, used here as placeholder, the rest of chain should remain unchanged no matter which name has been chosen.

maybe I got confused by the brackets, since these are used in code for interpolation.
When I read the documentation I thought it was referring to how you should write the variable when you want that it be interpolated. But now that you put your point of view, it makes sense and now I think maybe I'm wrong.

@Simek
Copy link
Collaborator

Simek commented Mar 16, 2021

maybe I got confused by the brackets, since these are used in code for interpolation.
When I read the documentation I thought it was referring to how you should write the variable when you want that it be interpolated. But now that you put your point of view, it makes sense and now I think maybe I'm wrong.

Template literals requires a dollar sign before the curly brackets:

@HughRdgz Maybe we can replace the brackets with other character, but both parentheses (NAME) and square braces [NAME] probably will cause more confusion. Do you have any other idea?

@HughRdgz
Copy link
Contributor Author

HughRdgz commented Mar 16, 2021

maybe I got confused by the brackets, since these are used in code for interpolation.
When I read the documentation I thought it was referring to how you should write the variable when you want that it be interpolated. But now that you put your point of view, it makes sense and now I think maybe I'm wrong.

Template literals requires a dollar sign before the curly brackets:

@HughRdgz Maybe we can replace the brackets with other character, but both parentheses (NAME) and square braces [NAME] probably will cause more confusion. Do you have any other idea?

What do you thing about angle brackets?
It's just an idea

@Simek
Copy link
Collaborator

Simek commented Mar 16, 2021

What do you thing about angle brackets?
It's just an idea

@HughRdgz We can try that, can you update the PR and include change also to the base docs at /docs/?

I will look through the code how often we use this format and if any other notes should be changed too, to preserve the consistency across the website.

@Simek
Copy link
Collaborator

Simek commented Mar 20, 2021

@HughRdgz It looks like this was the only one place on the website where such placeholder format has been used.

I have also received feedback, that using angle brackets will resemble too much of JSX syntax, so at this moment of time I have changed the placeholder name to more descriptive one, which I hope will also make it more obvious, that it's just a pseudo-code example.

@Simek Simek merged commit c4ff195 into facebook:master Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants