Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Mention type defs
  • Loading branch information
gaearon committed Feb 1, 2019
commit ee5fea9f36c9e6cbeaff0b494160a180dd27075f
2 changes: 2 additions & 0 deletions content/blog/2019-02-04-react-v16.8.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Note that **to enable Hooks, all React packages need to be 16.8.0 or higher**. H

**React Native will fully support Hooks in its next stable release.**
Copy link
Member

Choose a reason for hiding this comment

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

can we include a version number?


The final TypeScript and Flow definitions are currently in review and will be available soon.
Copy link

@Jessidhia Jessidhia Feb 3, 2019

Choose a reason for hiding this comment

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

It was actually accidentally merged early and is already available in @types/react@16.8.1 😅

Fortunately the only part that is not compatible for current alpha users is the 3rd argument to useReduce.

Copy link

@Jessidhia Jessidhia Feb 4, 2019

Choose a reason for hiding this comment

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

To clarify, the DefinitelyTyped publish bot does an auto-publish, with a patch version bump, every time a PR is merged. There were 2 PRs to update the API so the first publish to have both was 16.8.1.


## Tooling Support

React Hooks are now fully supported by React DevTools. They are also supported in the latest Flow and TypeScript definitions for React. We strongly recommend enabling a new [lint rule called `eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks) to enforce best practices with Hooks. It will soon be included into Create React App by default.

Choose a reason for hiding this comment

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

I'll take the opportunity to ask a question if you don't mind. I noticed that hooks' values aren't easily editable like class properties in the DevTools, which was a surprise for me.

react

Although they could be considered "fully-supported" in the sense of what's possible to do in regards to implementation details, I'd think the passage also implies feature-parity with the way people are used to interact with class components.

The way the sentence is structured implies a solved problem. Is it the case? Or will hooks' values also be as flexible in the future?

Expand Down