Skip to content

Is using hooks in preact class components expected? #4641

Answered by rschristian
18MrF asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, technically class components and function components aren't entirely separate things in Preact; instead, hooks build on top of class components.

It'll look weird to a lot of people, and so isn't something we necessarily advertise too often, but it's completely stable and will work for the foreseeable future for sure. Go wild with it if it can be useful for your app.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@18MrF
Comment options

Answer selected by JoviDeCroock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants