> For the complete documentation index, see [llms.txt](https://giorgosart.gitbook.io/react-easy-edit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://giorgosart.gitbook.io/react-easy-edit/examples/toggle-edit-mode-for-multiple-components.md).

# Toggle edit mode for multiple components 🔥

You can now control the state of multiple `EasyEdit` components by externally manipulating the prop `editMode`. In the example below, we have an **Edit** button that controls toggles between the view and edit state of three `EasyEdit` components.

{% embed url="<https://codesandbox.io/embed/toggle-edit-mode-gizkw?autoresize=1&fontsize=14&hidenavigation=1&theme=dark>" %}

{% hint style="warning" %}
You cannot change the `editMode` prop from within the same component as they are read-only, all React components must act like pure functions with respect to their props.
{% endhint %}
