React Inline Editable HOC
A simple higher-order component for adding inline editing to any field.
Example
const BasicInlineField = isEditing setEditing finishedEditing setTempValue tempValue inputRef value isEditing ? <input onBlur= { } onChange= value=tempValue ref=inputRef /> : <span onClick= onFocus= > value </span> const WrappedBasicInlineField = BasicInlineField ReactDOM
Also see the examples inside the example directory. You can run them locally
with npm run example
.