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

[WIP] Try update to React 16.8 #57

Merged
merged 10 commits into from
Feb 6, 2019
Merged

[WIP] Try update to React 16.8 #57

merged 10 commits into from
Feb 6, 2019

Conversation

danielkcz
Copy link
Collaborator

@danielkcz danielkcz commented Feb 6, 2019

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
Copy link
Collaborator Author

danielkcz commented Feb 6, 2019

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
Copy link

coveralls commented Feb 6, 2019

Coverage Status

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

@danielkcz
Copy link
Collaborator Author

danielkcz commented Feb 6, 2019

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
Contributor

Should really setup some dependencies auto update app - recommendations?

yarn upgrade-interactive ?

src/utils.ts Show resolved Hide resolved
test/useDisposable.test.tsx Show resolved Hide resolved
@xaviergonz
Copy link
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
Contributor

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

@danielkcz
Copy link
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
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
Copy link

stnwk commented Feb 7, 2019

@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