@mmsmithlegal@rishmishra I rather work with a good product manager rather than a project manager. The project managers I met before are just people checking in useless performance metrics. Great product managers know exactly what the customers need, they do not coordinate, but they know the product
Problem: When you deploy a new version of your SPA, users with a tab open will keep using the old SPA code.
Yesterday, I shared one solution. People suggested dozens of useful variations and alternatives. 🙏
So, here are the best options in the massive thread.
6 ways to tell the SPA a new release is available, simplest options first:
1. Write the version from package.json into index.html as part of the build process. Poll index.html every x minutes and compare the server's index.html to the client's index.html.
2. Create an endpoint on the UI web server that reads the package.json version, and returns it. Poll this every x minutes. This is more efficient than option 1, because the payload is smaller.
3. Use web sockets or server sent events to push a notification to the UI after a deploy instead. This is especially attractive if you’re already using these technologies.
4. Use a service worker to notify the user when the UI is stale. For example, Vite's PWA plugin supports this.
5. Use an API proxy like Cloudfront to fetch the version without involving the backend. More here: https://t.co/Esr4Q9tOqS
6. Specify the app version in each HTTP call from the UI via a x-app-version header (or whatever name you like). Validate the x-app-version header on the API server. If x-app-version doesn't match the server's version, notify the UI in the response, either via an HTTP 205, 400, or 422 (the HTTP response you return depends on whether you want calls from a “stale” UI to succeed).
A really cool idea for REPL:
The 'explain' command that takes a piece of code and describes its every part in a beginner-friendly way.
I don't recall any programming language doing this.
Here's my prototype for OCaml 👇
What do you think?
Explicaciones animadas sobre desarrollo web 🚀
🤘 Descarga la animación en formato webm
🤘 Copia el código para incluirlo en tu proyecto
https://t.co/4V4tcG6ehA
✨ Accidentally built a pretty cool web3 app starter kit when working on web3host.
It uses @nextjs's new app router and server actions, Sign in with Ethereum, includes team scaffolding (w/ user roles & invites), and much more!
Check it out on GitHub 👉 https://t.co/xEAvTs9bMG