The reason for this bug is that the UnControlled component of react-codemirror2 only updates onBlur in componentDidMount, so subsequent calls to onBlur always get the cssProperties from the component mount in the closure context, thus overriding subsequent changes to the cssProperties
The reason for this bug is that the
UnControlled
component ofreact-codemirror2
only updates onBlur in componentDidMount, so subsequent calls to onBlur always get the cssProperties from the component mount in the closure context, thus overriding subsequent changes to the cssProperties