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(rect): update first render return value #465

Merged
merged 1 commit into from
Feb 13, 2020

Conversation

tcoughlin3
Copy link
Contributor

@tcoughlin3 tcoughlin3 commented Feb 12, 2020

useRect returns null rather than undefined on the first render. I suppose a library consumer could get tripped up assuming it was undefined and write something like if (typeof rect === 'object') rect.width which would throw an error when rect is null.

Thank you for contributing to Reach UI! Please fill in this template before submitting your PR to help us process your request more quickly.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code (Compile and run).
  • Add or edit tests to reflect the change (Run with yarn test).
  • Add or edit Storybook examples to reflect the change (Run with yarn start).
  • Ensure formatting is consistent with the project's Prettier configuration.

This pull request:

  • Creates a new package
  • Fixes a bug in an existing package
  • Adds additional features/functionality to an existing package
  • Updates documentation or example code
  • Other

If creating a new package:

  • Make sure the new package directory contains each of the following, and that their structure/formatting mirrors other related examples in the project:
    • examples directory
    • src directory with an index.js entry file
    • Type definitions in an index.d.ts file are desired but not required for the PR to be merged
    • At least one example file per feature introduced by the new package
    • Base styles in a style.css file (if needed by the new package)

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 47d30f3:

Sandbox Source
priceless-platform-fbyy1 Configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Documentation Changes to the docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants