In my previous post I demonstrated how ETags can help your web application implement concurrent data access and optimistic locking. Except I didn’t use a web application …
Rather than a web application I used a shell to curl REST endpoints, while on the other hand simulate concurrency using SQLcl. This wasn’t particularly realistic, and I definitely wanted to come up with something better. For quite some time now I wanted to try React 19, and I finally had an opportunity to do so.
Here’s a short video explaining how optimistic locking, implemented in React, might look like. I took some shortcuts writing the application, and didn’t quite implement all the React best practices so please be gentle. The key points however should have come across.
Best experience when watching in full screen mode, I recorded in full HD.
If you’ve got comments/suggestions, feel free to leave them with my GitHub!