0 votes
in ReactJS by
What is the recommended way for naming components?

1 Answer

0 votes
by

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 {

  // ...

}

Related questions

0 votes
asked May 7, 2023 in NLP using Python by john ganales
0 votes
asked Jun 12, 2022 in Azure Data Factory by SakshiSharma
...