Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

The plugin does not work if the (functional) component returns a Fragment within a forwardRef #11

Open
tranvansang opened this issue Oct 26, 2020 · 1 comment

Comments

@tranvansang
Copy link

Working example

function Comp() {
  return <div>my comp</div>
}
export default forwardRef(Comp)

Non-working example

function Comp() {
  return <><div>my comp</div></>
}
export default forwardRef(Comp)
@tmcneal
Copy link

tmcneal commented Dec 2, 2021

Hi @tranvansang - I've written a Webpack plugin that detects this variant of defining a React component and emits a displayName property. You can find it here: https://github.com/runreflect/webpack-react-component-name

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

No branches or pull requests

2 participants