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

move constant data out of hooks #1

Merged
merged 1 commit into from
Nov 12, 2019

Conversation

wmertens
Copy link
Contributor

I don't understand why useState is being used here, so I thought I'd make a PR to figure it out.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@wmertens wmertens mentioned this pull request Nov 12, 2019
@wmertens
Copy link
Contributor Author

The tests fail because they change the navigator data after the module has loaded, which wouldn't happen in a real browser.

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@koester
Copy link

koester commented Nov 12, 2019

@wmertens
You forgot to remove the now unused useState import tho.

@alireza-mh alireza-mh mentioned this pull request Nov 12, 2019
@wmertens wmertens changed the title save-data: move static data out of function move constant data out of hooks Nov 12, 2019
@addyosmani
Copy link
Collaborator

Thank you for working through these changes to drop useState where it's unnecessary, @wmertens. Happy to land this patch.

@addyosmani addyosmani merged commit 378b2fd into GoogleChromeLabs:master Nov 12, 2019
@wmertens wmertens deleted the patch-1 branch November 12, 2019 18: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

5 participants