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

fix(PageLayout): update useLayoutEffect to isomorphic effect #2432

Merged
merged 5 commits into from Oct 17, 2022

Conversation

joshblack
Copy link
Member

Closes #2430

This PR updates useStickyPaneHeight to use the useIsomorphicLayoutEffect utility instead of React.useLayoutEffect to work in SSR.

It also updates useResponsiveValue to use the fallback value during SSR by setting the default value of useMedia to false.

Would love feedback here to see if this update matches the intent of useResponsiveValue or if I should find a way to expose these fallback values through the component API 馃憖

@joshblack joshblack requested review from a team and pksjce October 13, 2022 15:06
@changeset-bot
Copy link

changeset-bot bot commented Oct 13, 2022

馃 Changeset detected

Latest commit: 7c0538e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Oct 13, 2022

size-limit report 馃摝

Path Size
dist/browser.esm.js 77.92 KB (-0.02% 馃斀)
dist/browser.umd.js 78.57 KB (-0.01% 馃斀)

@joshblack joshblack temporarily deployed to github-pages October 13, 2022 15:13 Inactive
Copy link
Contributor

@colebemis colebemis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@joshblack joshblack enabled auto-merge (squash) October 14, 2022 21:02
@joshblack joshblack temporarily deployed to github-pages October 14, 2022 21:10 Inactive
@joshblack joshblack temporarily deployed to github-pages October 17, 2022 15:24 Inactive
@joshblack joshblack merged commit 99309e0 into main Oct 17, 2022
@joshblack joshblack deleted the 2430-add-isomorphic-effect branch October 17, 2022 15:25
@primer-css primer-css mentioned this pull request Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.
2 participants