Current Behavior
In JSX, use of <></> is synonymous of Fragment vnodes. It'd be great to have support for this within Flarum extensions.
Currently we can create fragments using [], but having different syntaxes can lead to being confusing. In my opinion, we should follow the general consensus throughout JSX-using libraries.
Bug Report
Current Behavior In JSX, use of
<></>
is synonymous of Fragment vnodes. It'd be great to have support for this within Flarum extensions.Currently we can create fragments using
[]
, but having different syntaxes can lead to being confusing. In my opinion, we should follow the general consensus throughout JSX-using libraries.Solution
At a glace, we should be able to add this by modifying the webpack config to include
pragmaFrag: 'm.fragment'
alongside the existingpragma: 'm'
. This is explained one scroll-click up from this heading: https://babeljs.io/docs/en/babel-plugin-transform-react-jsx/#installationSteps to Reproduce
<>{...}</>