React Element Factories and JSX Warning
You probably came here because your code is calling your component as a plain function call. This is now deprecated:
JSX
React components can no longer be called directly like this. Instead you can use JSX.
Without JSX
If you don't want to, or can't use JSX, then you'll need to wrap your component in a factory before calling it:
This is an easy upgrade path if you have a lot of existing function calls.
Dynamic components without JSX
If you get a component class from a dynamic source, then it might be unnecessary to create a factory that you immediately invoke. Instead you can just create your element inline:
In Depth
Last updated