# Migration Guide to v2.0.0

### Installation

To install the latest version, run:

```bash
npm install react-easy-edit@latest
```

Or, if you're using yarn:

```bash
yarn add react-easy-edit@latest
```

### Migration Steps

**Update Prop Names:**

* Replace `attributes` with `inputAttributes`.
* Replace `allowEdit` with `editable`.
* Replace `editMode` with `isEditing`.

### Breaking Changes

#### 1. Prop Renaming

**a. `attributes` ➔ `inputAttributes`**

**Old Usage:**

<pre class="language-jsx"><code class="lang-jsx"><strong>&#x3C;EasyEdit
</strong>  attributes={{ placeholder: 'Enter text' }}
  value={value}
  onSave={handleSave}
/>
</code></pre>

**New Usage:**

```jsx
<EasyEdit
  inputAttributes={{ placeholder: 'Enter text' }}
  value={value}
  onSave={handleSave}
/>
```

**b. `allowEdit` ➔ `editable`**

**Old Usage:**

```jsx
<EasyEdit
  allowEdit={true}
  value={value}
  onSave={handleSave}
/>
```

**New Usage:**

```jsx
<EasyEdit
  editable={true}
  value={value}
  onSave={handleSave}
/>
```

**c. `editMode` ➔ `isEditing`**

**Old Usage:**

```jsx
<EasyEdit
  editMode={true}
  value={value}
  onSave={handleSave}
/>
```

**New Usage:**

```jsx
<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.

1.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://giorgosart.gitbook.io/react-easy-edit/migration-guide-to-v2.0.0.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
