Skip to content

Fixed a wrong state name in explanation; renamed state name to follow naming convention#5886

Merged
gaearon merged 1 commit intoreactjs:mainfrom
Aleksandar15:fix-state-names
Apr 6, 2023
Merged

Fixed a wrong state name in explanation; renamed state name to follow naming convention#5886
gaearon merged 1 commit intoreactjs:mainfrom
Aleksandar15:fix-state-names

Conversation

@Aleksandar15
Copy link
Copy Markdown
Contributor

Updated updating-arrays-in-state.md.

At the Updating objects inside arrays part of the section, the very first explanation is referring to a state yourArtworks which is a state that doesn't exist in the Sandpack above. I renamed it into yourList which is the correct state name this explanation refers to.
Below is an image of the current explanation:
Before fixing
After fixing:
After fixing


The second fix is inside the Sandpack of Write concise update logic with Immer part of the sub-section on the same page, where a state named yourArtworks has a setter function named updateYourList, so, this state should instead be named yourList - which would additionally save readers from the confusion of why this state name has changed when its logic is a continuation of the two Sandpack's above it (in the same section) which are using yourList name; alongside following naming conventions.

Below are images of the current code:
Before fixing Part1
Before fixing Part2

After renaming:
After fixing Part1
After fixing Part2

@facebook-github-bot
Copy link
Copy Markdown
Collaborator

Hi @Aleksandar15!

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@meta.com. Thanks!

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 6, 2023

Size changes

Details

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

This PR introduced no changes to the javascript bundle 🙌

@gaearon gaearon merged commit afffd7f into reactjs:main Apr 6, 2023
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.

3 participants