Files
react.dev/examples/update-on-async-rendering/initializing-state-after.js
2018-02-07 09:21:26 -08:00

11 lines
180 B
JavaScript

// After
class ExampleComponent extends React.Component {
// highlight-range{1-6}
state = {
count: 0,
derivedValue: computeDerivedValue(
this.props
),
};
}