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

Contrlled elemented example with functional components #173

Open
majidsajadi opened this issue Dec 6, 2022 · 1 comment
Open

Contrlled elemented example with functional components #173

majidsajadi opened this issue Dec 6, 2022 · 1 comment

Comments

@majidsajadi
Copy link

all of the examples are implemented using react class components and its hard to migrate theme to functional components.
for example Controlled elements Re-Flex example using ReactDOM.findDOMNode(this) which is deprecated and not usefull in the functional component.
also i cant find a way to translate the snippet below to useState hook. since useState is not sync anymore.

this.setState({
          size
        }, () => resolve())
@leefsmp
Copy link
Owner

leefsmp commented Dec 8, 2022

this is more general React class to FC migration question rather than specific to that lib. I don't have time to rewrite the examples at the moment unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants