-
Notifications
You must be signed in to change notification settings - Fork 29.4k
Closed
Milestone
Description
Feature request
Problem
Functional components yield a more performant and readable code. It's been hinted by React team that class
'es may be split into a separate package in the near future. It would be nice for Next.js to provide a way to create apps without classes. Currently it's not possible as _app.js
and _document.js
require to extend Next's React classes.
Solution
If Next's controlling components can be rewritten with React Hooks, the entire Next app should consist of functional components by default. Perhaps we could have a version that uses that style as an opt-in for backwards compatibility.
Alternative
I am considering rewriting the above-mentioned components in my project folder, but I fear that it may cause some issues.
Additional context
This is pretty much it.
meenie, plotka, lukasluecke, jth0024, pablohenriq and 80 moredmytro-lymarenko, BjoernRave, c10b10, straxico, beautyfree and 27 moredluciano, Alexpechonov, mzygmunt, KirillSuhodolov, jonatanramhoj and 1 more
Metadata
Metadata
Assignees
Labels
No labels