Some values of setState are delayed

How is it that after doing this, type and key are up to date, while data isn’t?
If I render these values data is always one update back. Is functional programming causing issues here? (I wouldn’t know why since it isn’t async)

NVM, I can’t believe I didn’t recognize that I’m accessing the key via the state :frowning:

    this.setState({
        action: {
            type: action,
            key: actionKey,
            data: this.state.rows.find((row) => {
                return row._id === this.state.action.key
            })
        }
    });