NextJS Feature Flagging Made Easy

  Рет қаралды 19,511

Jack Herrington

Jack Herrington

Күн бұрын

Пікірлер
@almeidaofthejoel
@almeidaofthejoel 4 ай бұрын
oh this is cool to see and hits home. i implemented feature flags from scratch at work haha. we use them everywhere now
@mattwooddc
@mattwooddc 4 ай бұрын
Thank you, great walkthrough, as always
@bob-l3n
@bob-l3n 4 ай бұрын
Really interested in how to turn the flags function to static mode, found the docs for this part to be rather confusing. Thanks for the video, super helpful!
@sweLogan
@sweLogan 4 ай бұрын
Wish Vercel did a dashboard so you could fetch the flags from them
@josersleal
@josersleal 4 ай бұрын
vercel? you mean aws + 400% of cost? build a dashboard
@morchellemusic2829
@morchellemusic2829 4 ай бұрын
We have that at my job. Fairy easy to make
@zakir.nuriiev
@zakir.nuriiev 4 ай бұрын
Thanks a lot for the interesting overview!
@shinchima
@shinchima 3 ай бұрын
nice work Jack
@TheAlphaGames
@TheAlphaGames 4 ай бұрын
I feel like you could just create an admin dashboard in your project and use vercel/ky (basically redis) to store the feature flag state which lets you have the option to either use redis CLI or some frontend/dashboard you create to toggle the feature flag. I think this was made as barebones as possible for just that thing
@jherr
@jherr 4 ай бұрын
Yeah, there are lots of different ways to store/manage feature flags. I chose a simple route here just for demonstration purposes.
@karsongrady
@karsongrady 4 ай бұрын
Hey Jack, great video! I do want to see how we can make this static. I build a lot of marketing pages and static is important so hearing I can use feature flags and still have the page be static has me intrigued!
@Jacur1980
@Jacur1980 4 ай бұрын
Yeah, I am new to NextJS but from logical point of view if you need two users to have different content at the same URL it cannot be fully static. I could imagine a PPR page but not fully static. Having said that, the only situation where it could be static is when you always render with given static values and then you can change them and redeploy the page or via that special UI if you need to test things. I am Next noob though and many things in this framework surprised me already It is also possible I am not understanding some terminology.
@srymisclick
@srymisclick 4 ай бұрын
@@Jacur1980 if only PPR was prod-ready... it would solve quite a few of those dilemmas, because then you can prerender the whole page except what's dynamic through a flag.
@muchis
@muchis 4 ай бұрын
cool! How impactful this is on response times? I guess this is considered as an additional request on all routes that need these flag checking so it would add up to the response time of that route/api right? and if hosted en s3 aws its a separate service that is billed on usage right?
@jherr
@jherr 4 ай бұрын
You can do a HEAD. Or put an SLA on it. Or from it with a CDN.
@dferber
@dferber 4 ай бұрын
You can store the flags in Edge Config which has minimal latency. When hosted on Vercel we optimise it so the reads happen without going over the network and achieve
@cjcheshire
@cjcheshire 4 ай бұрын
Very interested to see ISR with a/b and feature flags :)
@moacirtorres245
@moacirtorres245 4 ай бұрын
Thanks for the video. In a multi tenant application would it work too?
@shivaansh98
@shivaansh98 4 ай бұрын
Unable to understand what this has to do with this feature flag api? Can't we simply make an API request and based on return value, render our screen??
@dferber
@dferber 4 ай бұрын
Yes, that could totally be seen as using a flag too. In the original article I go as far as saying "you can just use a boolean and call that a flag" :) By using the Flags SDK you get stuff on top, like being able too see and override your flags in the toolbar, and being able to precompute flags to generate static variations. The Flags SDK also encodes best practices, like not being able to pass arguments to a flag from the call side to force the state of a flag to be the same across the whole application. The context is instead established from within the decide() function by calling headers(). This also allows deleting the flag without having to do a bunch of cleanup, or switching the implementation without having to touch the call sides.
@shankareshtn3890
@shankareshtn3890 4 ай бұрын
hey how do you show the node version and react version on the terminal
@daya07
@daya07 4 ай бұрын
That's a feature from a theme like powerlevel9k
@kaskas9x
@kaskas9x 4 ай бұрын
Any best alternative beside of vercel to apply feature flags for nextjs app ?
@SiCrip09
@SiCrip09 4 ай бұрын
Yeah it’s called flipt
@presida3927
@presida3927 4 ай бұрын
Uncle Jack, isn't feature flags work similarly to role base permission control?
@jherr
@jherr 4 ай бұрын
No. Flags are orthagonal to that. Feature flags control whether or not the feature is available at all. RBAC controls whether it's enabled/disabled for this particular user and is usually administrable by the tenant admin.
@presida3927
@presida3927 4 ай бұрын
@@jherr thank uncle for clarifying
@jonathanvandenberg3571
@jonathanvandenberg3571 4 ай бұрын
Hi Jack, I need that NextJs course, like pronto, please hurry.
@AKApseudo
@AKApseudo 4 ай бұрын
Anyone know a good tool for implementing feature flags in React Native?
@silvanatrabalon3195
@silvanatrabalon3195 3 ай бұрын
this work with page routes?
@ThiagoVieira91
@ThiagoVieira91 4 ай бұрын
Feature flags are great, but not unstable flags. I just use Payload as a headless to set my feature flags with Nextjs. Much more manageable.
@kaskas9x
@kaskas9x 4 ай бұрын
do u guys know what font Jack is using ?
@harolddennison122
@harolddennison122 4 ай бұрын
you can find it in the video description ;)
@marliote
@marliote 2 ай бұрын
why not only use true/false to show a feature from database?
@aymenbachiri-yh2hd
@aymenbachiri-yh2hd 3 ай бұрын
❤❤
@shaked1233
@shaked1233 4 ай бұрын
This is working only if deployed to Vercel?
@jherr
@jherr 4 ай бұрын
No. The static stuff, yes, probably. But the basic flags stuff doesn't require Vercel. The toolbar does.
@omega.developer
@omega.developer 4 ай бұрын
Hi jack, please get ride of those comments 😅. I think those are spam and spicy 😂.
@simpingsyndrome
@simpingsyndrome 4 ай бұрын
Yeah they've been around for years and google just ease with it.
@rubendacostaesilva8442
@rubendacostaesilva8442 4 ай бұрын
It's hard, they replicate worst then cockroaches. The main fault is with KZbin, but they simply don't care, because where will content creators move to?
@jherr
@jherr 4 ай бұрын
Wow. It's usually just two. Today I got five! Super exciting! Sigh. I'm not even sure what these comments do for these scammers.
@harshitgupta2803
@harshitgupta2803 4 ай бұрын
@@jherr my best guess. these are used for making youtube think that its an original account and not bot. then they are sold as (i can get 10k views, likes, subscribes on your youtube if you pay me so and so)
@jherr
@jherr 4 ай бұрын
@@harshitgupta2803 I fell for that scam very early on. They could vend exactly 1,000 views in just a few seconds. The promise was that it was all organic and they were doing it with real marketing and promotions. The reality was, in my case, that it was all referrals from XXX sites. There are LOTS of scams in the YT space.
@FranFiori94
@FranFiori94 4 ай бұрын
Another unstable feature from vercel, great!
@jherr
@jherr 4 ай бұрын
It's unstable now as an indication that the API may change before it's first official release. Marking pre-release APIs as unstable is an industry best practice.
@naveennirban
@naveennirban 4 ай бұрын
okay Ron, so you saying NextJs is in Hogwarts curriculum.
@mattd5419
@mattd5419 4 ай бұрын
you don't need "force-dynamic" when you are accessing headers and cookies
@jherr
@jherr 4 ай бұрын
Yeah, that's true. That was from the example code provided by Vercel. I should have pulled that out?
@anubisai
@anubisai 4 ай бұрын
Vecellllll (el)) not vercle
@anubisai
@anubisai 4 ай бұрын
Thanks for video, love u
@jherr
@jherr 4 ай бұрын
Yeah, I flip it all the time.
@EdwinMartin
@EdwinMartin 4 ай бұрын
My favorite pasta is vercelli
Payload: The Complete Backend for NextJS
27:10
Jack Herrington
Рет қаралды 56 М.
Walking Away From JavaScript
1:06:44
ThePrimeTime
Рет қаралды 219 М.
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
10 common mistakes with the Next.js App Router
20:37
Vercel
Рет қаралды 236 М.
The Honey Scam: Explained
10:53
Marques Brownlee
Рет қаралды 2,1 МЛН
I HACKED ShadCN to Create Insane React Templates and Installers
14:59
Jack Herrington
Рет қаралды 23 М.
How To Build Feature Flags Like A Senior Dev In 20 Minutes
20:33
Web Dev Simplified
Рет қаралды 110 М.
Don't build another effin' chatbot - Web Dev Challenge S1E1
21:54
Learn With Jason
Рет қаралды 160 М.
Next.js + Inngest: Unlocking Long-Running AI Workflow Automation
17:47
Why I don't use React-Query and tRPC in Next.js
18:58
ByteGrad
Рет қаралды 100 М.
My Bank Wanted $17.63 so I Used Python Instead.
4:42
Coding with Lewis
Рет қаралды 544 М.
OpenAI's o1 just hacked the system
26:31
AI Search
Рет қаралды 28 М.