Skip to content

Warning page for invalid Hook calls #1613

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

Merged
merged 7 commits into from
Feb 1, 2019

Conversation

gaearon
Copy link
Member

@gaearon gaearon commented Feb 1, 2019

@gaearon
Copy link
Member Author

gaearon commented Feb 1, 2019

@threepointone Tried to add you as reviewer but you don't show up for this repo, I think you need to add yourself

@reactjs-bot
Copy link

reactjs-bot commented Feb 1, 2019

Deploy preview for reactjs ready!

Built with commit 93446b6

https://deploy-preview-1613--reactjs.netlify.com

Copy link
Contributor

@threepointone threepointone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great stuff, love it


npm ls react

If you see more than one React, you'll need to figure out why this happens, and fix your dependency tree. For example, maybe a library you're using incorrectly specifies `react` as a dependency (rather than a peer dependency). Until such a library is fixed, [Yarn resolutions](https://yarnpkg.com/lang/en/docs/selective-version-resolutions/) is one possible workaround.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you see more than one React, you'll need to figure out why this happens, and fix your dependency tree. For example, maybe a library you're using incorrectly specifies `react` as a dependency (rather than a peer dependency). Until such a library is fixed, [Yarn resolutions](https://yarnpkg.com/lang/en/docs/selective-version-resolutions/) is one possible workaround.
If you see more than one React, you'll need to figure out why this happens, and fix your dependency tree. For example, maybe a library you're using incorrectly specifies `react` as a dependency (rather than a peer dependency). Until that library is fixed, [Yarn resolutions](https://yarnpkg.com/lang/en/docs/selective-version-resolutions/) is one possible workaround.

@gaearon gaearon merged commit f149987 into reactjs:master Feb 1, 2019
@gaearon gaearon deleted the warning-hook-invalid branch February 1, 2019 20:25
BetterZxx pushed a commit to BetterZxx/react.dev that referenced this pull request Mar 21, 2023
* add warning for invalid hook call

* Fix versions

* Split code examples

* unnecessary comma

* tweaks

* Update content/warnings/invalid-hook-call-warning.md

Co-Authored-By: gaearon <[email protected]>

* nit
BetterZxx pushed a commit to BetterZxx/react.dev that referenced this pull request Mar 21, 2023
* Update docs for stable Hooks

* Add Hooks to reference page

* Reword intro

* Tweak refwording

* Hooks blog post draft

* Link to roadmap from post

* Add more details

* Update and rename 2019-01-30-react-v16.8.0.md to 2019-02-04-react-v16.8.0.md

* changelog updates

* review tweaks

* Mention type defs

* add warning for invalid hook call

* Warning page for invalid Hook calls (reactjs#1613)

* add warning for invalid hook call

* Fix versions

* Split code examples

* unnecessary comma

* tweaks

* Update content/warnings/invalid-hook-call-warning.md

Co-Authored-By: gaearon <[email protected]>

* nit

* Update 2019-02-04-react-v16.8.0.md

* Thanks Sophie

* Update 2019-02-04-react-v16.8.0.md

* Revert "add warning for invalid hook call"

This reverts commit e301239.

* Tweaks

* Docs updates

* Point to codesandbox and usehooks as community examples

* tweaks

* testing

* Renamed Hooks blog/date

* Udpated changelog

* Replaced inaccurate comments

* Added ReactTestUtils.act() to CHANGELOG

* Moved blog post to Feb 6th

* Update version number in header and versions page

* Updated 16.8 CHANGELOG wording to also mention ReactTestRenderer.act()

* Fix typo on hooks availability

Might make people that are going through the docs confused.

* React Native will ship hooks in its 0.59 release. (reactjs#1633)

* Added link to 16.7 docs

* Port external gatsby-remark-autolink-headers plugin

* Implement custom-id syntax on headings

* Replace keys when inserting style/script tags

* react-testing-library now supports `act` (reactjs#1635)

* react-testing-library now supports `act`

* fix typo

* Document test renderer act (temporary fix)

* Use 16.8.1 (reactjs#1638)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants