Draft-js: Add hooks to API docs

Created on 31 Jan 2019  路  7Comments  路  Source: facebook/draft-js

documentation good first issue

Most helpful comment

Hi @rogovdm, can you provide some context for this issue? I am not sure what hooks you'd like to be added to docs.

All 7 comments

Hi @rogovdm, can you provide some context for this issue? I am not sure what hooks you'd like to be added to docs.

Sorry for not being clear enough.

I am talking about converting stuff like this:
javascript class MyInput extends React.Component { constructor(props) { super(props); this.state = {value: ''}; this.onChange = (evt) => this.setState({value: evt.target.value}); } render() { return <input value={this.state.value} onChange={this.onChange} />; } }

To use react hooks. useState etc.

Aha, okay - it makes a lot of sense. I'd wait till hooks are released officially before updating the docs. After all, Draft is not even using them yet 馃槗

@claudiopro , this is a date. They are officially released!

@rogovdm go ahead and propose a PR if you feel like doing it yourself! 馃憤馃徏

@claudiopro , I fall into using slate so can't promise anything. Anyway good luck with hooks - they are great!

Closing this one as the PR was merged! 馃帀

Was this page helpful?
0 / 5 - 0 ratings

Related issues

darklightblue picture darklightblue  路  3Comments

hs737 picture hs737  路  3Comments

ianstormtaylor picture ianstormtaylor  路  3Comments

pklavins picture pklavins  路  3Comments

ktjd123 picture ktjd123  路  3Comments