Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixing import issue with Jest 23.6 breaks using class properties in React 16.6.3 #1
FYI: fixing the import issue with Jest breaks using class properties shorthand and breaks dev build. Get the following in Terminal when running
ERROR in ./src/App.js
✖ 4 problems (2 errors, 2 warnings)
created this issue from a note
in React Workflow 2nd Edition Updated 2018
Dec 2, 2018
changed the title
Fixing import issue with Jest breaks using class properties in React 16.6.3
Dec 2, 2018
Not really quit sure if this is a bug or not, but it is not working as expected. This is not terrible since class properties have not even been approved yet, but still interested to know why it throws an error even though I have installed the Babel plugin @babel/plugin-proposal-class-properties and have it in .babelrc as well.
I figured out the solution to this problem last night and wrote an article about it entitled The New Babel 7 Config. For anyone interested in adding images to their projects, I also wrote an article about importing images in this second edition of the workflow entitled Importing Images in React 2.0: Jest (and Babel 7) and one on the "side effects" that resulted from such changes entitled The Jest Side Effect.