C
C
ckatala2019-01-27 14:49:06
React
ckatala, 2019-01-27 14:49:06

How to write a component?

Option 1

import React from 'react';

class App extends React.Component {
  render() {
    return (
      <React.Fragment>
        Компонент
      </React.Fragment>
    );
  }
}

export default App;

Option #2
import React, { Fragment, Component } from 'react';

class App extends Component {
  render() {
    return (
      <Fragment>
        Компонент
      </Fragment>
    );
  }
}

export default App;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
miliko mikoyan, 2019-01-28
@ckatala

how many people I know all write the second option

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question