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

fix(js): rely on environment instead of global object #572

Merged
merged 5 commits into from May 6, 2021

Conversation

shortcuts
Copy link
Member

Summary
To allow SSR and React Native support, we need our dom to rely on the environment props.

This PR adds a new eslint rule that disallow window and document usage in the codebase, and pass environment to the related functions.

shortcuts and others added 2 commits May 5, 2021 13:35
This will ensure that we access them via the `environment` param, allowing SSR and React Native support.
@codesandbox-ci
Copy link

codesandbox-ci bot commented May 5, 2021

Co-authored-by: François Chalifour <francoischalifour@users.noreply.github.com>
@francoischalifour francoischalifour changed the title fix(js) make dom rely on environment fix(js): rely on environment instead of global object May 6, 2021
Copy link
Member

@francoischalifour francoischalifour left a comment

Choose a reason for hiding this comment

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

Great!

@shortcuts shortcuts merged commit 0a33b44 into next May 6, 2021
@shortcuts shortcuts deleted the fix/environment branch May 6, 2021 08:09
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.

None yet

2 participants