m-input-number icon indicating copy to clipboard operation
m-input-number copied to clipboard

🚨 fix inconsistent component state updates

Open s0 opened this issue 6 years ago • 1 comments

React component state updates using setState may asynchronously update this.props and this.state, thus it is not safe to use either of the two when calculating the new state passed to setState, and instead the callback-based variant should be used instead. (details here).

These were all found on LGTM.com, and there are a couple of other alerts for this project that would probably also be good to fix.

(Full disclosure: I'm part of the team behind LGTM.com)

s0 avatar Dec 13 '18 15:12 s0

Coverage Status

Coverage remained the same at 28.092% when pulling 7864590da1bdb311eb5187dbfce18eae9d1d3528 on samlanning:inconsistent-state into 71e3f9cffb25d75cbf12c17c144ba8cc87e25f8c on react-component:master.

coveralls avatar Dec 13 '18 15:12 coveralls