Cosden Solutions
Cosden Solutions
  • Видео 186
  • Просмотров 5 936 504
I Tried a New Pattern in React
🚀 Project React → cosden.solutions/project-react
Join The Discord! → discord.cosden.solutions
VSCode Theme | Font → Material Theme Darker | Menlo, Monaco "monospace"
In this video I will share with you a new pattern that I've recently applied to a project in React. This is a pattern that I'm not 100% sure about, and that I expect it might break at some point in the future. But for now, it seems to work fine and solves my problem nicely! That is the pattern of using directly the type of the return function of data in React components!
Просмотров: 4 775

Видео

React i18next (Complete Tutorial)
Просмотров 10 тыс.18 часов назад
🚀 Project React → cosden.solutions/project-react Source Code → github.com/cosdensolutions/code/tree/master/videos/long/server-components-simple-tutorial Join The Discord! → discord.cosden.solutions VSCode Theme | Font → Material Theme Darker | Menlo, Monaco "monospace" In this video we will learn about translating your React app into multiple languages using React-i18next. This will allow you t...
Compound Components in React (Design Patterns)
Просмотров 28 тыс.14 дней назад
🚀 Project React → cosden.solutions/project-react Join The Discord! → discord.cosden.solutions VSCode Theme | Font → Material Theme Darker | Menlo, Monaco "monospace" In this video we will talk about compound components in React. Compound components is a great design pattern to adopt in React. It allows you to break apart a component into multiple sub-components that are meant to be used togethe...
Authentication in React with JWTs, Access & Refresh Tokens (Complete Tutorial)
Просмотров 34 тыс.21 день назад
🚀 Project React → cosden.solutions/project-react Join The Discord! → discord.cosden.solutions VSCode Theme | Font → Material Theme Darker | Menlo, Monaco "monospace" In this video we will learn how to handle authentication in React with JWTs and access & refresh tokens. We will learn about the mental model of authentication, where to store each type of token, and finally we will look at some Re...
I Built a Game with React (Code Review)
Просмотров 5 тыс.Месяц назад
🚀 Project React → cosden.solutions/project-react Join The Discord! → discord.cosden.solutions VSCode Theme | Font → Material Theme Darker | Menlo, Monaco "monospace" In this video I will show you how I built a game with React and we are going to do a code review on the code! I will show you how I merged a 3d game engine with React to combine the powers of both and create something really cool. ...
7 Senior React Developer Tools (Realistic Workday)
Просмотров 13 тыс.Месяц назад
Check Out Pullpo → pullpo.io/products/channels 🚀 Project React → cosden.solutions/project-react Join The Discord! → discord.cosden.solutions VSCode Theme | Font → Material Theme Darker | Menlo, Monaco "monospace" In this video I will share with you 7 tools that I use as a senior React developer. I will also show you what a realistic workday looks like and how I use these tools to be more produc...
How I Write Clean Code in React
Просмотров 25 тыс.Месяц назад
Check Out Brilliant → brilliant.org/CosdenSolutions 🚀 Project React → cosden.solutions/project-react Join The Discord! → discord.cosden.solutions VSCode Theme | Font → Material Theme Darker | Menlo, Monaco "monospace" In this video I will show you how I write clean code in React. I will show you my mindset, how I approach a problem, and how I break it down into multiple small parts to make it m...
Reusable Create & Edit Form in React (React Hook Form, Zod)
Просмотров 21 тыс.2 месяца назад
🚀 Project React → cosden.solutions/project-react Source Code → github.com/cosdensolutions/code/tree/master/videos/long/reusable-create-edit-form Join The Discord! → discord.cosden.solutions VSCode Theme | Font → Material Theme Darker | Menlo, Monaco "monospace" In this video I will show you how to create a reusable create & edit form in React using React Hook Form and Zod. We're going to be goi...
The Weirdest Pattern in React
Просмотров 8 тыс.2 месяца назад
🚀 Project React → cosden.solutions/project-react Join The Discord! → discord.cosden.solutions VSCode Theme | Font → Material Theme Darker | Menlo, Monaco "monospace" In this video we will talk about the weirdest pattern in React. This is something that is in the official React docs, but isn't talked about often. The pattern is about setting state during rendering. Which is really weird to be ho...
React Email with Resend (Complete Tutorial)
Просмотров 12 тыс.2 месяца назад
🚀 Project React → cosden.solutions/project-react Source Code → github.com/cosdensolutions/code/tree/master/videos/long/react-email-with-resend-tutorial Join The Discord! → discord.cosden.solutions VSCode Theme | Font → Material Theme Darker | Menlo, Monaco "monospace" In this video we will learn how to send emails in React with React Email and Resend. We will build a custom email from scratch u...
You Are Using useEffect Wrong
Просмотров 32 тыс.2 месяца назад
You Are Using useEffect Wrong
I Found the Perfect Open Source React Project (Code Review)
Просмотров 63 тыс.2 месяца назад
I Found the Perfect Open Source React Project (Code Review)
Server Components in React (Simple Tutorial)
Просмотров 14 тыс.2 месяца назад
Server Components in React (Simple Tutorial)
Efficiently Render 100,000 Rows in React
Просмотров 16 тыс.2 месяца назад
Efficiently Render 100,000 Rows in React
Welcome to Project React
Просмотров 12 тыс.3 месяца назад
Welcome to Project React
Stop Watching React Tutorials in 2024
Просмотров 17 тыс.3 месяца назад
Stop Watching React Tutorials in 2024
Build a Reusable Component in React (Shadcn/ui, Tailwind)
Просмотров 20 тыс.3 месяца назад
Build a Reusable Component in React (Shadcn/ui, Tailwind)
Building a Mock API in React
Просмотров 9 тыс.3 месяца назад
Building a Mock API in React
Introducing Project React
Просмотров 3,5 тыс.3 месяца назад
Introducing Project React
Infinite Pagination Component With React Query
Просмотров 15 тыс.4 месяца назад
Infinite Pagination Component With React Query
Custom Hooks in React (Design Patterns)
Просмотров 34 тыс.4 месяца назад
Custom Hooks in React (Design Patterns)
Converting JSX to TSX in React
Просмотров 11 тыс.4 месяца назад
Converting JSX to TSX in React
Why Did They Do This?! (Code Review)
Просмотров 15 тыс.4 месяца назад
Why Did They Do This?! (Code Review)
React Router - Complete Tutorial
Просмотров 84 тыс.4 месяца назад
React Router - Complete Tutorial
Custom Protected Route Component in React
Просмотров 36 тыс.5 месяцев назад
Custom Protected Route Component in React
Single Responsibility Principle in React (Design Patterns)
Просмотров 45 тыс.5 месяцев назад
Single Responsibility Principle in React (Design Patterns)
React Hook Form - Complete Tutorial (with Zod)
Просмотров 86 тыс.5 месяцев назад
React Hook Form - Complete Tutorial (with Zod)
React Developer Roadmap 2024
Просмотров 39 тыс.5 месяцев назад
React Developer Roadmap 2024
I can't believe I wrote this! - Code Review
Просмотров 7 тыс.6 месяцев назад
I can't believe I wrote this! - Code Review
Zustand - Complete Tutorial
Просмотров 67 тыс.6 месяцев назад
Zustand - Complete Tutorial

Комментарии

  • @rea_kr
    @rea_kr 5 часов назад

    Could you upload the starter code to your GitHub repository? I'd like to follow along while watching the video.

  • @elie3423
    @elie3423 5 часов назад

    Why don't you just use http cookie for both. I do that and it works. The frontend should not deal with any token whatsoever. It's key to have an interceptor in axios config.

  • @nowarm
    @nowarm 8 часов назад

    great tutorial! thx

  • @zush2305
    @zush2305 14 часов назад

    This is pretty interesting, I often find myself stuck on simple problems specifically related to types because I keep thinking about future proofing, I should take up the mentality to loosen that up and embrace the fact the future changes is okay to happen and doesn't mean that the code is bad. I am wondering why wouldn't you create a global interface for the routines and for each component use "Pick" and choose what you need from that global interface.

  • @-mahmoudadel2628
    @-mahmoudadel2628 15 часов назад

    Waht about making a video for event tracker and how to integrate google analytics with react? ❤

  • @nowarm
    @nowarm 16 часов назад

    love your explanation!

  • @rickyrozario1577
    @rickyrozario1577 16 часов назад

    Subscribed. What a easy way to explain! Loved the video. Keep the great vids coming!

  • @dieguitto08
    @dieguitto08 17 часов назад

    That pattern is commonly used for functions coming from third parties libraries where the type definition is not clear or defined, hence this is a good solution to infer the type out of it. From my point of view you have 2 solutions, either you create multiple interfaces to define the different types and then add all of those into a “main” interface so you can use them in the different components or you could use something like zodiac schemas, to validate the data types are correct during runtime and then infer the different types out of the schemas so you can reuse them. Mainly both solution are dependent of a multiple data types that are link to a master data type, the advantage of the second solution is that you make sure the data gets validated before propagating down the children components

  • @ivan4486
    @ivan4486 19 часов назад

    I used it once, and it worked well with normal tags in locales, and without passing the whole string in addition to the key. It only supported simple tags like strong etc. But it worked.

  • @priyanshuganatra
    @priyanshuganatra 20 часов назад

    4:52 "Or did it?" *VSauce music plays in bg*

  • @antonsakovsky5818
    @antonsakovsky5818 21 час назад

    It was really useful

  • @relaxingtime2411
    @relaxingtime2411 21 час назад

    A great tutorial, hats off 🫡

  • @master-ik9ro
    @master-ik9ro 22 часа назад

    i really love how the guy's body language communicates the fact that he knows what he is talkig about. his classes feel like they are only ones you will ever truly need

  • @tomerharari633
    @tomerharari633 День назад

    I've been putting interceptors in a separate axiosPrivate file that would define an axios instance that I'd use across my application. I'm curious why you put interceptors inside of React. Would placing interceptor outside of react behave any differently?

  • @user-wf4ew5gx1q
    @user-wf4ew5gx1q День назад

    introduction icon was awesome

  • @oyerohabib
    @oyerohabib День назад

    Thank you so much for this video. Could you kindly share the code for this, it makes it even more easier to follow along.

  • @baller_remorse
    @baller_remorse День назад

    Cosden Solutions you must watch your health

  • @braidofelipe
    @braidofelipe День назад

    Create Interfaces, you can create a lot of small interfaces with each piece of the result you need, and them create a "master" interface to extends all the others. Your function can be set to return the interface type and each component can be set to receive just the interface with the properties are needed

  • @SkillR1
    @SkillR1 День назад

    Looks like you are holding a lot of data when you don't need all of it at the same time For each routine you are holding all its items, which also holding all of its entries Maybe you could split that into multiple API endpoints, and ask for the items for specific routine only in the place that you need it react query is already handling all the caching for you(in case you'll need again the items for already-viewed routine for example).

  •  День назад

    `type RoutineAndXYZ = Awaited<...>` and then just use that everywhere I suppose.

  • @byAdnan
    @byAdnan День назад

    What you can do is to create a Contract that both the Provider and Consumer use. You define your Contract as something like "RoutineResult". Your Provider is for example your "getRoutineVersionForDate" and it is forced to return anything that satisfies the Contract. Your Consumer is for example your Component which also is forced to handle input in the form described by the Contract. This way ensures that your Consumer is no longer tied to the actual implementation / provider and thus they do not know about each other. You also ged rid of that repeated Awaited<...> typing. What I like to do is to create the Contract using Zod / Yup or something else to also provide a Schema which I use to Validate my Output and Input data so that I can react to invalid data on runtime side

  • @srt4baby24
    @srt4baby24 День назад

    what do you use to record these videos?

  • @rometpastak1
    @rometpastak1 День назад

    Can we also use context in this situation, so we don't have to pass props to these components, and get props from custom context hook instead?

    • @tusharjain9701
      @tusharjain9701 День назад

      Context don't work with RSC. However tanstack query can be used here to avoid props drilling

  • @USPSLaura
    @USPSLaura День назад

    I have questions do you prefer using nodejs for backend or using services like firebase or aws

    • @lllXchrisXlll
      @lllXchrisXlll День назад

      This question doesn't make sense. Nodejs is a runtime. You can host a nodejs based application in f.ex. firebase or aws. They are not mutually exclusive.

    • @USPSLaura
      @USPSLaura День назад

      @@lllXchrisXlll it makes sense because you can build a fullstack application without hosting a fucking node Js app

    • @Tian-wi6qr
      @Tian-wi6qr День назад

      Dude what are you waffling about, how do you make a backend using aws?

    • @USPSLaura
      @USPSLaura День назад

      @@Tian-wi6qr 😢

    • @USPSLaura
      @USPSLaura День назад

      @@Tian-wi6qrhow long have you been on coding, you need to understand difference between hosting your node Js app on aws and using aws service as backend, sometimes you might want to save yourself the stress of having to have separate code and separate file location for your backend

  • @ojomudamola6674
    @ojomudamola6674 День назад

    Why does your type ="text" for your email input

  • @sudhanshujha7225
    @sudhanshujha7225 День назад

    Bhai...maza agaya

  • @awekeningbro1207
    @awekeningbro1207 День назад

    does the useTransition hook work with react's userReducer just like it would be useState?

  • @awekeningbro1207
    @awekeningbro1207 День назад

    so basically useTransition is just debouncing the function to be invoked a little bit later(in milliseconds)?

  • @StyX_CharLEE
    @StyX_CharLEE День назад

    You should change keyboard if want make videos..

  • @andygaal7936
    @andygaal7936 День назад

    very nice and clear tutorial, an additional example would have been fine where the role of the clean up function is being demonstrated

  • @abdelhakimkhabir
    @abdelhakimkhabir День назад

    Theo made a video of the problems of using normal fetch and UseEffect .... We can solve these problems but code will be unreadable

  • @abdelhakimkhabir
    @abdelhakimkhabir День назад

    UseEffect runs on mount ... Stat charge Unmount 9:30 cleanup: state change or unmount

  • @igorujevic5986
    @igorujevic5986 2 дня назад

    Great video!! Is it possible to share whole atuh provider code with us?

  • @adusparx
    @adusparx 2 дня назад

    If you store token in state won't it get deleted on page refresh? Then what would you send to the server. So every time the page is refreshed the user needs to relogin?

  • @penguinxed
    @penguinxed 2 дня назад

    Great tutorial bro! Appreciate it so much. Clear and concise.

  • @hamza-325
    @hamza-325 2 дня назад

    As someone coming from Flutter background, this seems to be the best UI library that I am going to learn. I don't understand why there is so much hate for it in the comments section. I am a full-stack developer and I don't want to spend ages making the UI, and I loved how the material UI on Flutter was able to make something beautiful by default without much work. It seems that I found the equivalent on the Web. At the beginning I thought that it should have the same naming as Flutter (Like Container instead of Box) but this is not a big problem, especially when you get so much advanced components like ratings for free!

  • @Granta_Omega
    @Granta_Omega 2 дня назад

    This makes my testes hurt.

  • @abdelhakimkhabir
    @abdelhakimkhabir 2 дня назад

    00:37 Understanding the folder structure and architecture in React 01:34 Page folder determines the skeleton of the React application and user navigation. 03:08 Components folder to hold all UI reusable components. 04:35 Components/UI folder to hold all small reusable components by other components. 06:20 Hooks folder. 07:45 (optional) services/api or services/i18n for multi-language support (internalization), services/stat for state management like redux, 09:09 services/providers for app warppers or for context (rename it to services/context if it's just for context) 09:50 utils folder for small, useful, Others : utils/helpers.ts or utils/formatters.ts 12:00 subscribe😃

  • @abdelhakimkhabir
    @abdelhakimkhabir 2 дня назад

    don't know why love watching your videos🤍

  • @mario_luigie4593
    @mario_luigie4593 3 дня назад

    this is probably the best rhf lesson i have ever seen ! Thank you so much!

  • @katrin_awsm
    @katrin_awsm 3 дня назад

    Thank you very much! Very useful and understandable

  • @tangsi721
    @tangsi721 3 дня назад

    perfect example

  • @ethan-b
    @ethan-b 3 дня назад

    I'm sorry, but please get someone who knows a little more about react or at least prepares before hand. His answer that a disadvantage of the virtual DOM is "performance"??? The entire reason react was created and uses a virtual DOM is to improve performance for highly interactive applications compared to older frameworks like jQuery. I get that it's a youtube video and you just supply the answer anyway, but this would be much better as you just answering the questions yourself.

  • @user-ri5oz4qz4n
    @user-ri5oz4qz4n 3 дня назад

    muito bom

  • @MASTERISHABH
    @MASTERISHABH 3 дня назад

    "Refresh token is very very secret and should not leak out of the server" 😂😂 Nah bro!! That's not how it works.

  • @miloman1995s
    @miloman1995s 3 дня назад

    video starts at 01:07

  • @Max-ed4yd
    @Max-ed4yd 3 дня назад

    Спасибо большое, очень полезный урок!

  • @MehdiDeveloper
    @MehdiDeveloper 3 дня назад

    I noticed your tattoo - is it Farsi? It made me curious if you're Iranian. :))

  • @yashkapure8511
    @yashkapure8511 3 дня назад

    Loved the custom hooks part!❤

  • @buraxta_
    @buraxta_ 3 дня назад

    Why do we need a POST api and point? I did it within a server action and it worked