Skip to content

Commit

Permalink
Merge branch 'master' into 1266-fix-components-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman authored Jun 22, 2017
2 parents f496deb + 3a27e21 commit c61e045
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/pages/basics/faq/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,10 @@ Create React App does not allow providing options to Jest in your `package.json`
```sh
npm test -- --coverage --collectCoverageFrom='["src/**/*.{js,jsx}","!src/**/stories/*"]'
```

### I see `ReferenceError: React is not defined` when using storybooks with Next.js

Next automatically defines `React` for all of your files via a babel plugin. You must define `React` for JSX to work. You can solve this either by:

1. Adding `import React from 'react'` to your component files.
1. Adding a `.babelrc` that includes [`babel-plugin-react-require`](https://www.npmjs.com/package/babel-plugin-react-require)

0 comments on commit c61e045

Please sign in to comment.