Do not mutate state directly


#1

Lines 75 to 147 see below-- throws a “Do not mutate state directly. Use setState() react/no-direct-mutation-state.” Compile Warning.


if (this.state.field == null) {
this.state.field = this.props.packTypeName_ed;

Needs to Change to ——

if (this.state.field == null) {
this.setState({
field = this.props.packTypeName_ed;
});

Steve


#2

Ah yeah, you are right. That needs to be fixed. Thanks for pointing it out!

-Juha