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

docs(start/tutorial): remove unnecessary useEffect #9561

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Commits on Jun 5, 2024

  1. Remove unnecessary useEffect from tutorial code example

    Using useEffect for syncing state with props (or other external state) is unnecessary, and can trigger additional renders and potentially flashes of incorrect content. We can use a useState to detect changes in order to trigger a sync. 
    
    This is explicitly allowed by React – https://react.dev/learn/you-might-not-need-an-effect#adjusting-some-state-when-a-prop-changes
    nathggns committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    e3237bf View commit details
    Browse the repository at this point in the history
  2. Add missing semicolon

    nathggns committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    9d78702 View commit details
    Browse the repository at this point in the history
  3. Sign the CLA

    nathggns committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    36db322 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2024

  1. Configuration menu
    Copy the full SHA
    c830a04 View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2024

  1. Configuration menu
    Copy the full SHA
    153b26b View commit details
    Browse the repository at this point in the history