/etc/passwd), the field would have to be rerendered entirely to clear it.
This proved very easy to do in React. The
key attribute, if changed, will force an element to be rerendered. Therefore, we can simply do this:
Now every time the
onDelete handler is called, the key will update with a new timestamp and force a rerender.