π₯Migration Guide to v2.0.0
Installation
To install the latest version, run:
npm install react-easy-edit@latest
Or, if you're using yarn:
yarn add react-easy-edit@latest
Migration Steps
Update Prop Names:
Replace
attributes
withinputAttributes
.Replace
allowEdit
witheditable
.Replace
editMode
withisEditing
.
Breaking Changes
1. Prop Renaming
a. attributes
β inputAttributes
Old Usage:
<EasyEdit
attributes={{ placeholder: 'Enter text' }}
value={value}
onSave={handleSave}
/>
New Usage:
<EasyEdit
inputAttributes={{ placeholder: 'Enter text' }}
value={value}
onSave={handleSave}
/>
b. allowEdit
β editable
Old Usage:
<EasyEdit
allowEdit={true}
value={value}
onSave={handleSave}
/>
New Usage:
<EasyEdit
editable={true}
value={value}
onSave={handleSave}
/>
c. editMode
β isEditing
Old Usage:
<EasyEdit
editMode={true}
value={value}
onSave={handleSave}
/>
New Usage:
<EasyEdit
isEditing={true}
value={value}
onSave={handleSave}
/>
Enhancements
Functional Components: The library has been completely rewritten using functional components, providing better performance and compatibility with React hooks.
Improved Testing: Unit tests have been updated to reflect the latest changes, achieving 100% test coverage for increased reliability.
Last updated