Props
| Name | Type | Default | Description |
|---|
import { Constant } from 'flowr';Constant will render it's children only once, with their initial state, effectively preventing any updates.
// ...
state = { count: 0 }
increment = () => {
this.setState(({count}) => ({
count: count + 1
}))
}
render() {
return (
{this.state.count}
)
}
// Constant's children will never be updated
// Will render:
0
| Name | Type | Default | Description |
|---|
Contribute on Github! Edit this section.