no re render after state change code example
Example: react set state before render
componentDidMount() {
this.setState({
thing: [
{
status: "running",
test: "testing"
}
]
});
}
render() {
return (
{this.state.thing.length > 0? { this.state.thing[0].status }: null
}
);
}