🔥Migration Guide to v2.0.0
Installation
To install the latest version, run:
npm install react-easy-edit@latestOr, if you're using yarn:
yarn add react-easy-edit@latestMigration Steps
Update Prop Names:
Replace
attributeswithinputAttributes.Replace
allowEditwitheditable.Replace
editModewithisEditing.
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