Skip to content

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.

.

3 participants