Uploaded July 2024 | Updated September 2026, 3 weeks ago
What if you could make your backend respond in 0ms? ⚡️
In a real scenario, some api calls will most often be successful (hopefully) so here's the trick, bring some optimism in your application and instantly update the UI as if the operation went through.
You can't have a slow backend, if you don't even wait for the response 🧠
I tested the useOptimistic hook introduced in React 18 in my new Nextjs 14 side project and I thought it was worth sharing!
_______________________________
Support my work: github.com/sponsors/Balastrong ❤️
Hit like and subscribe for more content! :D
Beginner-Friendly Open Source Projects: github.com/DevLeonardoCommunity
Join the Discord community! Here's the invite: discord.gg/bqwyEa6We6
You can also follow me on the other platforms:
Twitter: twitter.com/Balastrong
dev.to: dev.to/balastrong
GitHub: github.com/Balastrong
Home: https://leonardomontini.dev/
TikTok: tiktok.com/@balastrong
Instagram: instagram.com/devbalastrong
_______________________________
TIMESTAMPS
00:00 Problem Showcase
01:00 Simple Optimistic Update
02:00 Optimistic Array Element Removal
04:40 Updates Outside Server Actions
05:24 Optimistic Double Render
06:00 Optimistic Reducer
08:12 Bonus Tip
08:38 Code on GitHub - Myntenance Project
#nextjs #coding #reactjs
What if you could make your backend respond in 0ms? ⚡️
In a real scenario, some api calls will most often be successful (hopefully) so here's the trick, bring some optimism in your application and instantly update the UI as if the operation went through.
You can't have a slow backend, if you don't even wait for the response 🧠
I tested the useOptimistic hook introduced in React 18 in my new Nextjs 14 side project and I thought it was worth sharing!
_______________________________
Support my work: github.com/sponsors/Balastrong ❤️
Hit like and subscribe for more content! :D
Beginner-Friendly Open Source Projects: github.com/DevLeonardoCommunity
Join the Discord community! Here's the invite: discord.gg/bqwyEa6We6
You can also follow me on the other platforms:
Twitter: twitter.com/Balastrong
dev.to: dev.to/balastrong
GitHub: github.com/Balastrong
Home: https://leonardomontini.dev/
TikTok: tiktok.com/@balastrong
Instagram: instagram.com/devbalastrong
_______________________________
TIMESTAMPS
00:00 Problem Showcase
01:00 Simple Optimistic Update
02:00 Optimistic Array Element Removal
04:40 Updates Outside Server Actions
05:24 Optimistic Double Render
06:00 Optimistic Reducer
08:12 Bonus Tip
08:38 Code on GitHub - Myntenance Project
#nextjs #coding #reactjs
![[GitHub UPDATE] Comment entire Files on Pull Requests
Since yesterday (π day) you can add comments to entire files on GitHub when reviewing Pull Requests, in addition to the inline comments we already know ✍️
Hit like and subscribe for more content! :D
Join the Discord community! Heres the invite: https://discord.gg/bqwyEa6We6
You can also follow me on the other platforms:
Twitter: https://twitter.com/Balastrong
dev.to: https://dev.to/balastrong
TikTok: https://www.tiktok.com/@balastrong
GitHub: https://github.com/Balastrong
Instagram: https://www.instagram.com/devbalastrong/
Sound effects from https://www.zapsplat.com
#github #progamming #opensource [GitHub UPDATE] Comment entire Files on Pull Requests](https://i.ytimg.com/vi/Fo5QNXBmaM8/mqdefault.jpg)





![Do you Know Javascript? [Round 3]
Full video here: https://youtu.be/8gGuu9c9miY
A series of Javascript minigames to test your knowledge, have fun and maybe also learn something new!
Hit like and subscribe for more content! :D
Join the Discord community! Heres the invite: https://discord.gg/bqwyEa6We6
You can also follow me on the other platforms:
Twitter: https://twitter.com/Balastrong
dev.to: https://dev.to/balastrong
TikTok: https://www.tiktok.com/@balastrong
GitHub: https://github.com/Balastrong
Instagram: https://www.instagram.com/devbalastrong/ Do you Know Javascript? [Round 3]](https://i.ytimg.com/vi/HmLhxdBZKDY/mqdefault.jpg)


![Will GitHub Copilot become the Captain? [Live Session Recording]
Recording of a practice run for the session delivered live at Codemotion Milan 2024
Watch more demos: https://www.youtube.com/playlist?list=PLOQjd5dsGSxLRBUDKZvQhnqOjzNeMUkDj
GitHub Copilot Workspace: https://youtu.be/FARf9emEPjI
More on using context in Copilot Chat: https://youtu.be/y_dfDUuaQD4
The event: https://conferences.codemotion.com/milan2024/
Support my work: https://github.com/sponsors/Balastrong ❤️
Hit like and subscribe for more content! :D
Beginner-Friendly Open Source Projects: https://github.com/DevLeonardoCommunity
Join the Discord community! Heres the invite: https://discord.gg/bqwyEa6We6
You can also follow me on the other platforms:
Twitter: https://twitter.com/Balastrong
dev.to: https://dev.to/balastrong
GitHub: https://github.com/Balastrong
Home: https://leonardomontini.dev/
TikTok: https://www.tiktok.com/@balastrong
Instagram: https://www.instagram.com/devbalastrong/
00:00 Intro
00:10 Slides - Why using Copilot
03:52 Demo - Tips and Trick
18:18 Slides - Copilot Captain? Will GitHub Copilot become the Captain? [Live Session Recording]](https://i.ytimg.com/vi/InQT82hI66E/mqdefault.jpg)
