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

use isomorphic useEffect depending on whether it's being run on the server or the client #260

Closed
wants to merge 1 commit into from

Conversation

failingtwice
Copy link
Contributor

No description provided.

@failingtwice failingtwice requested a review from avsetsin August 17, 2021 03:47
@failingtwice failingtwice linked an issue Aug 17, 2021 that may be closed by this pull request
@@ -42,8 +42,12 @@ const setStyleProperty = (
}
}

export const useLockScroll = (element: HTMLElement = document.body): void => {
const useIsomorphicLayoutEffect =
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like a useful stuff, can we put it in a separate file and export from package?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, will do.

As for the PR itself, I. guess it's okay to close it. Doesn't seem like a good solution, as we've discussed.

@avsetsin avsetsin closed this Aug 22, 2021
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.

Modal causes a crash whenever it's open: true onMount
2 participants