import `React` 否则 babel-loader 打包完会报错
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 35
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
index.js 如果没有 import 出 React :
import { Component } from 'react'
babel-loader 打包完后会报:
Uncaught ReferenceError: React is not defined
So:
import React, { Component } from 'react'
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open index.js and review the React import used with babel-loader. Make the import include the React namespace, then run the project’s build to confirm the bundled code no longer raises “React is not defined”.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- babel, javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100