Write a React component that shows a text value (provided as a prop) with an edit button…
- User
Write a React component that shows a text value (provided as a prop) with an edit button which turns it into an input box that then calls an onChange handler to change the value and go back to text again.
- Assistant
Here's a simple React component that will achieve this functionality:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.