S
S
Sergey Suntsev2018-03-29 08:58:16
React
Sergey Suntsev, 2018-03-29 08:58:16

What does the code "class Root extends Component" mean?

Specifically interested in Component <Props>How is understood <Props>?
Is it some kind of interface?
Here is the whole file

// @flow
import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { ConnectedRouter } from 'react-router-redux';
import Routes from '../routes';

type Props = {
  store: {},
  history: {}
};

export default class Root extends Component<Props> {
  render() {
    return (
      <Provider store={this.props.store}>
        <ConnectedRouter history={this.props.history}>
          <Routes />
        </ConnectedRouter>
      </Provider>
    );
  }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2018-03-29
@GreyCrew

https://flow.org/en/docs/react/components/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question