Closed vaynevayne closed 1 year ago
Nope the limitation is wanted so that each component to have a name, so stacktraces and devtools are not filled with "anonymous components".
Plus the verbose part comes from using a default export, which has a lot a bad things with (grep can miss usage, not nice when exporting multiple components per files and extra line). The only benefit is that you can use with React.lazy, which is the edge case for most components
export const Demo = memo(InternalDemo)
or
export const Demo = memo(function InternalDemo () {
...
})
When using memo, it needs to be packaged many times. It is too verbose. Can it be optimized?