Is it possible to make the search appear in the center?
@AtchuthaRamaReddyKarri3 күн бұрын
Nice
@TheAmzngAids4 күн бұрын
What does imperative programming have to do with immutability, they aren't mutually exclusive concepts. Filter is fundamentally the exact same thing, but likely with extra steps and more memory overhead. classic web dev abstract away everything and wonder why we have no RAM left.
@tenacity_dev3 күн бұрын
Well imperative programming would be a for loop and inside of that loop you would mutate some data, that's exactly what we don't want. We want data to be immutable. We want const and not let keywords. So it has everything to do with immutability. We will loop over maybe one hundred values, why should I write ten lines of imperative and mutable code when I can just do it with a filter method which is more readable. Premature optimization is the root of all evil. When your app gets slow or when you have to iterate over ten thousand elements then you can think about expanding the implementation and making it faster.
@rarox09454 күн бұрын
If an HR is rejecting Dev's based on if they are using built in mapping methods (which are not zero cost in JS btw.), said company needs a new HR. But, I do agree with the "you should make code readable" point.
@tenacity_dev3 күн бұрын
It's more about using the right tools for the job rather than blindly using the most performant method. Performance is a whole other topic in Web.
@UocLv4 күн бұрын
How someone with your skill level is allowed to review code is beyond my understanding. And you even attempt to teach others? Half of your examples are based on opinion. How can you expect anyone to know what your preferences are? This is just unacceptable.
@tenacity_dev4 күн бұрын
So good engineers use prop drilling, reinvent the wheel for each problem, use no types, don't have a good file structure and conventions? These are not preferences.
@Nurgul6264 күн бұрын
"second mistake" doesn't look like one. After joining all field into one object, you introduce unnecessary object creation on every key press, and you create new instance of updateUserInfo function for every component rerender And then you use destructing to get data back from the state object, copying values once again
@tenacity_dev4 күн бұрын
The issue of function instance creation can be addressed using the useCallback hook. However, with the upcoming React compiler, this problem will be resolved automatically. Additionally, the problem can be solved with a form library, which I mentioned later in the video. The real mistake here is in overusing useState hooks and failing to group related data effectively which creates problems in the long run and unmaintainable code.
@Nurgul6264 күн бұрын
@@tenacity_dev even react docs mentioned splitting state into multiple useState hooks, check older documentation hooks FAQ, title "Should I use one or many state variables?" (KZbin blocks links, so I can't send it directly)
@HACKER-zw3hs4 күн бұрын
i use javascript with jsdoc getting the best of tow worlds 😂😂
@elbeenny4 күн бұрын
Good video. Disagree with the typescript thing tho. Shouldnt judge people just for that if they build great stuff that works in js
@Pi-Maurya5 күн бұрын
You are filtering out the completeTodos but naming the output array as incompleteTodos.
@tenacity_dev4 күн бұрын
Ah true, I named it the other way around. Nice catch
@jesse99965 күн бұрын
"If you use JavaScript in 2025 you should stop." You should certainly stop giving that silly "advice". Good developers use both JS and TS.
@tenacity_dev5 күн бұрын
There's a reason why companies, solo engineers and startups use Typescript. It's not because the logo is a different color. The benefits that Typescript provides are immense. JS can be used for small projects but for anything other than that it will give you headaches.
@jesse99965 күн бұрын
@@tenacity_dev Then why did you say "If you use JavaScript in 2025 you should stop."? Talk about saying one thing and meaning another. (And what a silly thing to say)
@tenacity_dev5 күн бұрын
@@jesse9996 Yes, you should switch to Typescript. If you haven't tried Typescript, go and try it, I'm sure you will love it and wouldn't want to go back and use plain JS anymore.
@jesse99965 күн бұрын
@tenacity_dev Your comment is laughable.
@Vitaxses5 күн бұрын
New thumbnail = viral video
@timcates42615 күн бұрын
map and filter on large data sets introduce noticeable slowdowns. While you may be an advocate for functional programming vs the imperative approach the correct answer is to know why you are using the tool not just to switch to it. While I love functional programming I refuse to use a method that is going to be slower than a boomer loop. While in your todo example it makes sense it will stop making sense if you ever work with a real dataset The rest of the video has a lot of good points. I would argue the "need" for typescript I prefer JSDoc to get types when I want them.
@tenacity_dev5 күн бұрын
I agree, but for most use cases in modern apps it will not be needed to use for loops for the performance boost. What you just said comes from knowing the language and I fully agree that we should know the performance differences but readability and maintainability of the code is often times more important for modern apps than performance when looping over approximately one hundred objects max. If you are going to do a for loop, you can also do loop unrolling to save clock cycles but that just goes way out of scope for most web development. 🚀
@dusansavic88445 күн бұрын
en.wikipedia.org/wiki/Higher-order_function
@prashlovessamosa5 күн бұрын
can you please cover react router as a framework approach.
@tenacity_dev5 күн бұрын
I'll put that on my list for future videos
@hamm89345 күн бұрын
This is the most react developer video ive ever seen
@sonja22135 күн бұрын
duckaj karu pavijane
@rodrigonovais96245 күн бұрын
3:30 By the end we have more than double lines than the initial "problematic" multiple useStates, cause not only we still have multiple state lines, to maintain the object readable, we also have the types and the utility function that was not needed in the first example
@tenacity_dev5 күн бұрын
I see what you mean. But imagine that if that component grew and we needed to add more things. The example above would become unmaintainable because there would be no structure, lots of functions that are not reused and no typings.
@turculaurentiu915 күн бұрын
It also might introduce unnecessary re-renders as when the object changes, all the components that rely on only one of the fields will re-render, even if the field content is the same. Then you have to use useReducer and make it even more complicated.
@rodrigonovais96245 күн бұрын
@@tenacity_dev I can only see it being useful for very short and strict typings. In your example an "address" is being mentioned. Would we use an internal "Address" type or create a new one? The address would be plain text or a structured object? In case of being a structured object, how many depth levels are we expecting to handle? And how complex would be the updating the state of a nested object of that depth? Collapsing data into a single state is not maintainable "by definition", aggregating them by its use can improve readability and maintainability in many cases
@tenacity_dev5 күн бұрын
@@turculaurentiu91 There will always be a balance between performance and how easy it is to write the code. When building something maintainability and the ability to easily change the code will often times be more important than maximising the performance. Real performance issues slow down the app and block the main thread, this won't affect it unless we really put everything inside on useState, which no one recommends.
@tenacity_dev5 күн бұрын
@@rodrigonovais9624 I mentioned that we should split the state into logical parts, the same goes with components. Now if you ask me if the user has an address and that address is not a primitive type and it has lots of other properties then that is just an out of the scope problem which has it's nuances.
@tanercoder19155 күн бұрын
More of this please
@tenacity_dev5 күн бұрын
Will do! I'm glad you found it useful.
@tanercoder19155 күн бұрын
@tenacity_dev very
@lleytonmorris63056 күн бұрын
"Why did this person use JavaScript when they could use Typescript". Mans speaking to my heart with this one
@honkhonkv22366 күн бұрын
thank you !
@kinanditav41117 күн бұрын
how to add frankenphp to docker, sorry im new in docker
@tenacity_dev7 күн бұрын
To use FrankenPHP you should pull the FrankenPHP image instead of the php-fpm image that is used in the video and then just move the Laravel code to the FrankenPHP image. FrankenPHP comes with Caddy so you don't need any web server to act as a reverse proxy. If you want a video about it tell me and I'll put it in my backlog.
@kinanditav41117 күн бұрын
@@tenacity_dev yes, sorry to bother you. Your video will help me a lot.
@tenacity_dev7 күн бұрын
@@kinanditav4111 No problem, I'll try to make a quick video about FrankenPHP
@kinanditav41117 күн бұрын
@@tenacity_dev thanks a lot
@ashkan.arabim8 күн бұрын
thanks for the awesome video! question: will this method also renew the refresh token if it's about to expire?
@tenacity_dev8 күн бұрын
Thank you! There is a separate API endpoint for refreshing the token, check dj rest auth documentation for more details.
@lukkaku12 күн бұрын
hi there, im trying to make run the migrations through alembic but idk what's going literally have the same thing as u and still dont want to recognize my tables, what should I do?
@mohamed-aladawy12 күн бұрын
good way! waiting for the manual way like the example you showed in the video :)
@tenacity_dev10 күн бұрын
Coming soon!
@chandrashekharmishra538213 күн бұрын
Found the best project of 2025 can you share the source code of the extension you just made? If possible P.S. - Just for educational purpose
@tenacity_dev3 күн бұрын
haha, thanks, I haven't posted it on Github, the entire code is all that's shown in the video.
@Mystery_Glitch13 күн бұрын
Well, I always know the extension obviously have tradeoff, but I thought it was just stealing my data instead of doing more doggy thing than that 🥴
@last.journey13 күн бұрын
Correct me if I'm wrong ! Adding 'client side' on top of every file you have is much easier than learning another framework And next js uses react so much of the tools that works on react would work on next js as well Secondly who said that you can't use next js as a frontend only and not as fullstack in fact if you used any backend fw you would still have to use a frontend to communicate with the backend and i see no problem on using next js for that
@tenacity_dev13 күн бұрын
You can use for example Vite with React or Remix, it's still React and you won't need to learn a new framework. Imagine this example, if you build something and 70% of the features of Next.js become obsolete. You will be using a framework with an overhead that is not needed. It's like using a car to somewhere that's one minute away. One factor that is also import is what you feel comfortable with, so if you feel comfortable with Next.js then use it, but it does not mean it's always the right choice.
@Three.Six.Nine.13 күн бұрын
Great video bro
@tenacity_dev13 күн бұрын
Thank you!
@DryBones11114 күн бұрын
Good illustration, though I think Honey opens a new background tab with their own affiliate link and lets the website do the cookie manipulation. This would simplify their code without needing to have parsing logic for every website/shopfront. It also means that you don't need to ask for cookie permissions making the whole thing harder to detect.
@tenacity_dev14 күн бұрын
Yes, they need dynamic data to load in for different sites, that's why that approach is better. I made this to show how simple it is to actually do these sort of things with URL swapping and cookie manipulation.
@hgecds14 күн бұрын
I thought you ment you developed a coupon searchong extension and was about to ask for a download link
@t-ree14 күн бұрын
Randomly clicked, but didnt regret
@tenacity_dev14 күн бұрын
Love to hear that!
@KiKaraage14 күн бұрын
Intriguing.
@metmans14 күн бұрын
Change the thumbnail and it will be a viral video ❤
@felixkoenigproductions764414 күн бұрын
Very true
@tenacity_dev14 күн бұрын
Thank you, it makes sense. Hmm, I'll think about what could be a good thumbnail for this video 🤔
@anurag931414 күн бұрын
It's working ig lol
@tenacity_dev14 күн бұрын
Changed it!
@mi.mikyu6913 күн бұрын
@@tenacity_dev just curious what was the thumbnail before?
@helaluddin-ng8qr14 күн бұрын
Wow this is greate video. Thank you Bro. Make more videos like this.
@tenacity_dev14 күн бұрын
Will do!
@DrakeBallew-n5c15 күн бұрын
Great video! Perfectly answered my questions about how to implement RHF with custom components - ty!
@tenacity_dev15 күн бұрын
Glad to hear that!
@glowing_flare16 күн бұрын
Underrated channel. You deserve millions of subscribers. ✨
@tenacity_dev16 күн бұрын
Thank you!!!
@antiquespride886119 күн бұрын
how can we use laravel reverb on this setup?
@another-day-202419 күн бұрын
We have to build a B2B system where our clinet can save their projects, can assign to others, can use AI to automate few stuff. Do you think NextJs will be good for this case?
@tenacity_dev18 күн бұрын
So it's a project management application, maybe something like Jira but with some AI integrations? I don't see a use case for SSR or really fast page loads or the need for the site to be indexed well. I presume that the clients will want their projects private and not seen by other people so I would not use Next.js there.
@another-day-202418 күн бұрын
@@tenacity_dev yeah client wants a simple project management module, but they have other stuffs they want. In general, I don't think any dashboard which are behind login/authentication should go for NextJs. In fact, if its decoupled it will be lot easier to scale up/down based on load. I spent quite some time recently on NextJs and thats what I figured. But there are places where SSR can be really helpful. I really wish something like Remix are still around.
@OplanoTutorials21 күн бұрын
Thanks a lot for this video. Can I use middlewares instead of using the layout file to protect routes?
@tenacity_dev3 күн бұрын
Hey, this video was made a while back, I'll probably create a new one talking about when to use which authentication method.
@prashlovessamosa22 күн бұрын
I don't know why KZbin deleted my comments I am asking for router v7 tut as a framework approach.
@Fidgoo22 күн бұрын
do brave have workspace like in arc?
@tenacity_dev7 күн бұрын
No it does not, Brave uses profiles which has similar functionality. You can have as many profiles as you want just like workspaces in Arc.
@tenacity_dev23 күн бұрын
Hey people, I made this video as a first step and a base starting point to use docker containers with Laravel. I see many of you are interested and want to know more about how to handle static files, how to get this ready for production and maybe even how to use nginx with this. If you are curious and want to see the stuff I mentioned above, please like the comment and I can revisit this video in depth if enough people are interested.
@عبدالرحيماحمدامين22 күн бұрын
😊
@hm-gl1li20 күн бұрын
Definitely interested
@2gbeh23 күн бұрын
This is technically Next.js pages router vs. app router. So basically still use Next which ever way.
@tenacity_dev18 күн бұрын
App router is the path that Vercel is taking and it has all the latest React features. Using the pages router is fine but migrating to App Router is recommended to use React's latest features.
@sabihass536123 күн бұрын
thank you
@shanemarchan65823 күн бұрын
They are holding ssr by the ballsacks rn, as soon as vite ssr is up to par thats it for nextjs.
@tenacity_dev23 күн бұрын
A huge complaint about Vercel and Next.js is that the Vercel team is working with the React team. It leads to issues where the React team will align to Vercel's goals and it's a sure way to be accused of being uncompetitive or accused of doing shady stuff.
@maykrpc23 күн бұрын
I am building a SPA with Next.js, and all the things you said are very true. I considered switching to Vite because I do not use the features that Next brings to the table, and I will not get all these types of errors resulting in a slowdown in development. Additionally, Vite is really fast in the development environment.
@tenacity_dev23 күн бұрын
I agree, look on the bright side of it, you learned a great lesson for your next projects.
@prashlovessamosa24 күн бұрын
Please create some tuts like you used to do
@tenacity_dev24 күн бұрын
Yes I will, what tutorial would you like to see?
@prashlovessamosa24 күн бұрын
@tenacity_dev for example tanstack router or router v7 as framework approach as an alternative to NextJS
@prashlovessamosa24 күн бұрын
@tenacity_dev like router v7 framework approach.
@theperson62423 күн бұрын
@@tenacity_dev Beginner guide for getting started on MERN stack or maybe regarding React
@rodrigommfreitas24 күн бұрын
I think people use nextjs way too much. I don't really like Vercel that much. If SEO isn't needed, Vite+React is fine, if SSR is needed there are other options such as remix, for static Astro all the way. I was using Next for simple static pages but now I'm going all in on Astro, it's simple, performant, fast
@tenacity_dev24 күн бұрын
I agree
@shahzaibshahzaibkhan648024 күн бұрын
Well shit, I need everything both in the dos and the donts 😂
@tenacity_dev24 күн бұрын
Hahahaha, well then split the app and set a reverse proxy to route the SSR needed pages to Next.js and the other ones to Vite app