MCPcopy
hub / github.com/facebook/react / constructor

Method constructor

fixtures/dom/src/components/Header.js:7–15  ·  view source on GitHub ↗
(props, context)

Source from the content-addressed store, hash-verified

5
6class Header extends React.Component {
7 constructor(props, context) {
8 super(props, context);
9 const query = parse(window.location.search);
10 const version = query.version || 'local';
11 const production = query.production || false;
12 const versions = [version];
13
14 this.state = {version, versions, production};
15 }
16 handleVersionChange(version) {
17 const query = parse(window.location.search);
18 query.version = version;

Callers

nothing calls this directly

Calls 1

parseFunction · 0.50

Tested by

no test coverage detected