What is the recommended way for naming components?

It is recommended to name the component by reference instead of using displayName.

Using displayName for naming component:

export default React.createClass({
displayName: 'TodoApp',
// ...
});

The recommended approach:

export default class TodoApp extends React.Component {
// ...
}

January 14, 2022
368