Skip to content
This repository was archived by the owner on Dec 31, 2020. It is now read-only.

[WIP] Try update to React 16.8 - #57

Merged
danielkcz merged 10 commits into
masterfrom
react168
Feb 6, 2019
Merged

danielkcz merged 10 commits into
masterfrom
react168

Conversation

@danielkcz

@danielkcz danielkcz commented Feb 6, 2019 •

Copy link
Copy Markdown
Collaborator

So 16.8 is officially out with hooks. I tried updating it and a bunch of tests got broken. I will look into it later or feel free to help with that.

Once it's fixed, I want to release this as 1.0.0. There won't be probably any API change for now anyway.

Fixes #58

@danielkcz

danielkcz commented Feb 6, 2019 •

Copy link
Copy Markdown
Collaborator Author

Ok, so fixing the tests was fairly easy after all. The useState apparently got optimized and it's no longer rerendering if a value hasn't actually changed. I had to revert our forceUpdate utility function which modification kinda slipped away in recent changes by @alsotang.

Wondering if there is actually some hooks variant of forceUpdate, haven't seen any mention of it.

Now we basically need to wait for react-testing-library to merge use of act utility to get rid of those warnings spilled all over the tests.

@coveralls

coveralls commented Feb 6, 2019 •

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-1.2%) to 98.824% when pulling d9e9282 on react168 into c363c9f on master.

@danielkcz

danielkcz commented Feb 6, 2019 •

Copy link
Copy Markdown
Collaborator Author

I've also upgraded other dev dependencies so we are coming to 1.0.0 with a clean slate. Should really setup some dependencies auto update app - recommendations?

Jest will stay at 23 for now because ts-jest support is not there yet.

@xaviergonz

Copy link
Copy Markdown
Contributor

Should really setup some dependencies auto update app - recommendations?

yarn upgrade-interactive ?

Comment thread src/utils.ts Resolved
Comment thread test/useDisposable.test.tsx Resolved
@xaviergonz

Copy link
Copy Markdown
Contributor

Btw, do the error console logs actually mean we should be using act on unit tests or are the react-testing-library guys going to fix that somehow?

@xaviergonz

Copy link
Copy Markdown
Contributor

Nevermind, just saw the comment about react-testing-library

@danielkcz

Copy link
Copy Markdown
Collaborator Author

@xaviergonz That's what I am trying to figure in here: testing-library/react-testing-library#281

Should really setup some dependencies auto update app - recommendations?

yarn upgrade-interactive ?

I mean something automatic. I do recall some Greenkeeper tool from the past, but not sure if there is something better.

@danielkcz

Copy link
Copy Markdown
Collaborator Author

Alright, tests are finally fixed to the top notch again. And React 16.8.1 got released meanwhile so it's there also :)

@danielkcz
danielkcz merged commit 384d857 into master Feb 6, 2019
@danielkcz
danielkcz deleted the react168 branch February 6, 2019 20:02
@stnwk

stnwk commented Feb 7, 2019

Copy link
Copy Markdown

@FredyC

I mean something automatic. I do recall some Greenkeeper tool from the past, but not sure if there is something better.

Take a look at https://renovatebot.com/ - it's free for Open Source Projects :)

Also: Thanks for being so quick about fixing this! ❤️

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mobx-react-lite 0.3.7 does not work with react 16.8.0

4 participants