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

rect: Fix issues with the observer between renders #622

Merged
merged 3 commits into from Jun 22, 2020

Conversation

chaance
Copy link
Member

@chaance chaance commented Jun 22, 2020

This PR fixes some issues in the rect package.

  • The observer should only be initialized and removed when either the DOM node or observe prop change.
  • The component stores the DOM node in state and updates internally any time that node reference is updated.

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

@chaance chaance added the Type: Bug Something isn't working label Jun 22, 2020
@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 a3ca034:

Sandbox Source
inspiring-hertz-svx8f Configuration

@chaance chaance merged commit 65938b5 into develop Jun 22, 2020
@chaance chaance deleted the rect-improvements branch June 22, 2020 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant