DEV Community

Cover image for Upgrading to React 17

Upgrading to React 17

John Fay on November 13, 2020

New Release As with any major release, there are typically breaking changes. Although the changelog for React states "No New Features" t...
Collapse
 
sesamechicken profile image
sesamechicken

Sadly we’re still waiting for the react 17 enzyme adapter. If you’re not - shame on you for not testing your code! 🤪

Collapse
 
keonik profile image
John Fay

Would you still need that if you’re using testing-library/react?

Collapse
 
sesamechicken profile image
sesamechicken

My guess is no, as you’re not dependent on enzyme. But, I’d have to stand up a test project or look at the testing-library repo

Thread Thread
 
keonik profile image
John Fay

I switched from enzyme to testing-library about a year and half ago. I honestly don’t remember enzyme much already. I do enjoy testing library’s access methods.

Thread Thread
 
sesamechicken profile image
sesamechicken

I should take a look! I primarily stick with jest because the test suites behave and are constructed for front end and back end (node) code.

Thread Thread
 
keonik profile image
John Fay

It’s still jest. It’s just an alternative for rendering components to enzyme. Yeah try it out!

Collapse
 
wojtekmaj profile image
Wojciech Maj • Edited

You can use @wojtekmaj /enzyme-adapter-react-17 while you're waiting for an official adapter :) Works perfectly for me so I've decided to share it with the community!

Collapse
 
kamalhossain profile image
Kamal Hossain

How important the testing is for react? Many small companies not doing that, is that a mistake they are making?

Collapse
 
sesamechicken profile image
sesamechicken

I think if you’re not testing your code, you’re opening yourself to avoidable mistakes, bugs, and regression issues. It also makes it near impossible to collaborate with others on large scale projects.

Thread Thread
 
kamalhossain profile image
Kamal Hossain

I am working on react and react-native projects around 1 year. I have tried to learn testing with jest and ezyme. But sadly I haven't found friendly tutorial for them. I think the resource for testing react is less available then learning the react without testing.

Thread Thread
 
sesamechicken profile image
sesamechicken

I can definitely help! There’s probably posts on here covering the topic or I could write something.

Thread Thread
 
kamalhossain profile image
Kamal Hossain

It would be very much appriciateable, thank you in advance.

Collapse
 
octsiri profile image
Dominggus Octovianus

Hi all, who has experienced flow server keeps stopping working while upgrading React 17? Even after I upgrade my flow version to 0.126.0, it stills the same. :(