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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add useUniqueId hook and fix several needlessly incrementing ids #2079

Merged
merged 4 commits into from
Sep 5, 2019

Commits on Sep 5, 2019

  1. Add useUniqueId hook

    This hook returns a stable value across multiple rerenders, and can
    optionally be overridden with a fixed value
    
    Use this hook in several functional components that currently have
    unstable ids that change between rerenders.
    
    Populate the idFactory of this hook in the AppProvider, with eye to
    eventually allowing consumers to override the idFactory so it can be
    reset between server renders (making this public and configurable is a
    follow up step)
    BPScott committed Sep 5, 2019
    Configuration menu
    Copy the full SHA
    14fd04a View commit details
    Browse the repository at this point in the history
  2. PR Feedback

    BPScott committed Sep 5, 2019
    Configuration menu
    Copy the full SHA
    484472e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    76a7808 View commit details
    Browse the repository at this point in the history
  4. More PR Feedback

    - Use PascalCase for default global prefix
    - Fix typos
    - Rejig tests to create elements a little more like what we would write
      in real components
    BPScott committed Sep 5, 2019
    Configuration menu
    Copy the full SHA
    6ddf629 View commit details
    Browse the repository at this point in the history