Installation

Usage

Via .babelrc (Recommended)

.babelrc

{
"plugins": ["@babel/plugin-transform-react-constant-elements"]
}

Options

allowMutablePropsOnTags

Array<string>, defaults to []

If you are using a particular library (like react-intl) that uses object properties, and you are sure
that the element won't modify its own props, you can whitelist the element so that objects are allowed.