Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any news on when React Hooks get added to create-react-app? #6351

Closed
dhuber666 opened this issue Feb 6, 2019 · 7 comments
Closed

Any news on when React Hooks get added to create-react-app? #6351

dhuber666 opened this issue Feb 6, 2019 · 7 comments

Comments

@dhuber666
Copy link

Hi guys,

since React Hooks are officially released I wanted to know if there are any plans when hooks will be present in the awesome create-react-app repo?

I'm just a little self thaught hobby developer that just works with create-react-app and I would love to use hooks. Can I manually update it after I created a project with create-react-app ?

Thank you so much guys for create-react-app you are doing an excellent job!

@robertvansteen
Copy link
Contributor

You can update the React version independently of create-react-app, so you can upgrade to 16.8.0 right now and enjoy hooks! 🎣

@bugzpodder
Copy link

Make sure react-dom is also upgraded.

@jacobrask
Copy link

I see there is a PR running for hooks support, but would it be ok to add the hook plugin to the eslint config even before that is merged?

@OriAmir
Copy link

OriAmir commented Feb 11, 2019

Hi, any news about eslint-plugin-react-hooks ? or about release a new version of create-react-app that includes hooks ? or we need to update that manually ?
tnx
@bugzpodder

@SunHuawei
Copy link

It's actually easy to upgrade to the newest version of react, and easy to integrate eslint-plugin-react-hooks. I done that in just few minutes on codesandbox.io. Click here to see it. You can also download the whole project to your local by clicking the download button.

For someone who are curious what I've done, I just list the steps here

  1. Create a React project on codesandbox.io
  2. Edit package.json to add "eslint-plugin-react-hooks": "1.0.1", in "dependencies", upgrade the versions of react and react-dom, if you'd like
  3. Create .eslintrc.json file on the root folder with these code
{
  "plugins": ["react-hooks"],
  "rules": {
    "react-hooks/rules-of-hooks": "error"
  }
}

@duhseekoh
Copy link

@SunHuawei - that eslint file isn't used by create-react-app's linting process. still ok to have one for your IDE integration, but it doesn't have an effect outside of that.

@gaearon gaearon reopened this Feb 13, 2019
@gaearon gaearon closed this as completed Feb 13, 2019
@gaearon
Copy link
Contributor

gaearon commented Feb 13, 2019

For ESLint rule, please track #5602.

@lock lock bot locked and limited conversation to collaborators Feb 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants