STOP Wasting Time! Your Next App Needs Vite! | JS, Typescript, React

Поделиться
HTML-код
  • Опубликовано: 6 июн 2024
  • Web Dev Roadmap for Beginners (Free!): bit.ly/DaveGrayWebDevRoadmap
    Your Next App Needs Vite! As a developer, you want efficient dev tools and set up time is often both redundant and inefficient. Vite provides "Next Generation Frontend Tooling" to speed up your project set up time and help get you to the part you like: writing code!
    🚀 Become a full-stack web dev with Zero To Mastery Courses:
    - The Complete Web Developer: bit.ly/WebDevMaster
    - Master the Coding Interview: bit.ly/FAANGInterview
    - Junior to Senior Dev Roadmap: bit.ly/WebDevRoadmap-JrtoSr
    🚩 Subscribe ➜ bit.ly/3nGHmNn
    📬 Course Updates ➜ courses.davegray.codes/
    ❓ Questions - Please post them to my Discord ➜ / discord
    ☕ Buy Me A Coffee ➜ www.buymeacoffee.com/davegray
    👇 Follow Me On Social Media:
    Github: github.com/gitdagray
    Twitter: / yesdavidgray
    LinkedIn: / davidagray
    Your Next App Project Needs Vite!
    (00:00) Intro
    (00:18) Welcome
    (00:39) Vite - pronounced Veet
    (00:58) Install Node.js
    (01:28) Create a Project with Vite
    (03:51) Exploring the Project Files
    (05:57) Create a React + TS Project with Vite
    (08:36) Docs: Deployment & Env Variables
    (09:47) Overall Verdict for Vite
    📚 Tutorial References:
    🔗 Vite: vitejs.dev/
    🔗 Node.js & npm: nodejs.org/
    ⚙ Web Dev Tools:
    🔗 Chrome Browser: www.google.com/chrome/
    🔗 Visual Studio Code (VS Code): code.visualstudio.com/
    🔗 Live Server VS Code Extension: marketplace.visualstudio.com/...
    Was this introduction to Vite helpful? If so, please share. Let me know your thoughts in the comments.
    #vite #web #app

Комментарии • 143

  • @DaveGrayTeachesCode
    @DaveGrayTeachesCode  Год назад +53

    Ahhh this video was supposed to post on Tuesday but I must have missed changing the date. All links and resources are now available in the description. 🚀

    • @ahmad-murery
      @ahmad-murery Год назад +4

      This is no excuse not to post a new video on Tuesday 😁
      Vite is really fast and interesting,
      Thanks Dave,

    • @musamutetwi1948
      @musamutetwi1948 Год назад +7

      No, actually Vite is so fast it actually build the video before actual date

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад

      @@musamutetwi1948 LOL that's funny!

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      @@ahmad-murery haha my friend! Maybe so!

    • @abhishekmazumder2060
      @abhishekmazumder2060 Год назад

      Simple and crisp tutorial. Which font are you using btw? Thanks!

  • @harag9
    @harag9 Год назад +4

    Recently new to the channel going through your react series as I'm a very old school front end developer (html, JQuery). But work has asked me to take over a react project. Vite looks very easy to setup too. Great video and thanks for all the tutorials, they are really easy to follow!

  • @ScriptRaccoon
    @ScriptRaccoon Год назад +23

    What makes Vite so cool is that it immediately updates your changes in the browser. The browser doesn't even need to refresh! So sometimes (for some reason not always) the data from the browser even remains (such as text inputs). This is made possible by HMR - hot module replacement.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +3

      Right on!

    • @mavdotj
      @mavdotj Год назад

      I use sveltekit and it is kinda fustrating when my stores reset after HMR

    • @abdousifelhak4486
      @abdousifelhak4486 Год назад +2

      create react app does the same , no ?

    • @nikoryu-lungma
      @nikoryu-lungma Год назад +1

      @@abdousifelhak4486
      No, it doesn't.
      The difference is very huge.
      In ViteJS, it does not install a bunch of packages while creating the app.
      In React, create-react-app installs a bunch of packages while creating the app.
      When React reloads, it reloads the whole thing, from top to bottom. It takes very long, and sometimes causes the app to crash.
      For ViteJS, it did not happen. The packages were lighter, and if you want to install more, you get to decide it.
      I haven't even mentioned the Server Side Rendering that React does not have

  • @SZaferUlgur
    @SZaferUlgur Год назад +1

    Great job.. The installation process was really tiring. Thank you so much.

  • @bkatsevych
    @bkatsevych Год назад

    Thanks a lot for another great video! Keep up the good work!

  • @TVTtheis
    @TVTtheis 4 месяца назад +1

    Thanks you for the overview ❤

  • @marcinzale
    @marcinzale Год назад +1

    Great content, as always! Thanks!

  • @konidoniravirr6580
    @konidoniravirr6580 Год назад

    You have a really good voice that i blindly subscribed. Thank you for this big video.😄

  • @nemzyxt
    @nemzyxt 6 месяцев назад

    Great content here, thanks for the video!

  • @sherifashraf8008
    @sherifashraf8008 Год назад +1

    Keep it up. You are doing a great job.❤

  • @sergeantsausage2609
    @sergeantsausage2609 Год назад

    I was surprised how easy it was to set up a full typescript react project. I was dreading setting up my webpack project, then i tried vite on a whim and was completely up and running in a few minutes.

  • @resulabdulla3825
    @resulabdulla3825 Год назад +1

    thanks you bro, This is awesome toolkit

  • @abdulazeez.98
    @abdulazeez.98 Год назад

    I have been hearing about Vite lately, this video made my mind to change to it!

  • @ashharkausar413
    @ashharkausar413 Год назад +5

    That's quick! In your career as an engineer can you give an example or 2 of projects that really challenged you? Was it an ecommerce site you built for someone? Perhaps you were creating some sort content management system or webdev tools such as an ORM. Sky is the limit for this question.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +14

      Inheriting a legacy codebase at work built with an OLD version of Adobe's ColdFusion and absolutely no project documentation. It is a hybrid of HTML & SQL combined. Adobe put it out to rival PHP. You don't hear much about it anymore. It has some tricky syntax... like instead of a comment in HTML that is

    • @ashharkausar413
      @ashharkausar413 Год назад

      @@DaveGrayTeachesCode Sometimes small things are not so small.

  • @faris.abuali
    @faris.abuali Год назад

    Thank you!
    Great tutorial

  • @willyhorizont8672
    @willyhorizont8672 Год назад

    This makes me want to migrate my CRA js app to VITE and Typescript 🚀

  • @virgiliogervacioestadillo1389
    @virgiliogervacioestadillo1389 Год назад +1

    Hi Dave! Can you make another tutorial with the addition of integrating jest or vite, react testing library and eslint so that it would be easy for us to use it in our future projects.

  • @codernerd7076
    @codernerd7076 Год назад +1

    💯 Vite is amazing just like this video!

  • @hamdiboujarra
    @hamdiboujarra Год назад

    thank you so much. please steve when dart and flutter?

  • @sonamohialdin3376
    @sonamohialdin3376 Год назад

    It is looking very useful frontend tool thank you

  • @frankli7035
    @frankli7035 Год назад

    amazing,long time required TS with vite

  • @konnichiwa01
    @konnichiwa01 Год назад

    Yes! Yes! Yes! Dave, you did it again. I was looking for a way to understand vite. Right time, Right Video. I love you (professionally).

  • @TravinskiyVladislav
    @TravinskiyVladislav Год назад

    thank you, Dave

  • @ewaevva4375
    @ewaevva4375 Год назад +2

    Dave, what about NestJS ? I'm currently learning it and would like to know your opinion about it, please 🙂

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +2

      I've heard good things! I'd like to cover it in the coming months.

  • @firstlastcode
    @firstlastcode Год назад

    Thanks for your good work boss

  • @okonkwo.ify18
    @okonkwo.ify18 Год назад

    Thank you Dave. I don’t know if u can help me get a remote job. I practically listen to every video u make and my head is full lol. Am in Nigeria, seems most companies focus on US and Europe

  • @gilbertardila
    @gilbertardila Год назад +1

    Forget about Webpack, no more complications vite is wonderful!!!

  • @_MoshikoAz_
    @_MoshikoAz_ Год назад

    thanks for the video, im gonna use vite in my next react app,
    any chance do you have a video explaining how to add noed express backend to the project using vite ?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад

      I would make the backend a separate project and just use npm with it. I have a Node.js course on my channel that builds a complete backend REST API.

  • @nicolasanderson5881
    @nicolasanderson5881 Год назад

    hi @Dave Gray can you do a tutorial on Turbopack? can it be used for react + typescript/ javascript as well?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      Great request! Turbopack is from Vercel and they say "Webpack users can also expect an incremental migration path into the Rust-based future with Turbopack." You can read more here: vercel.com/blog/turbopack

  • @johnychinese
    @johnychinese Год назад +2

    Vite is now Dave Certified 🛡

  • @dharmeshgohil9375
    @dharmeshgohil9375 Год назад

    awesome dev🤩🤩

  • @chirag-sg4kd
    @chirag-sg4kd 7 месяцев назад +1

    @Dave Gray I have a question as they say browser can't understand typescript it can only understand JavaScript then how we are writing .ts in our script tag in HTML file.

  • @youcancallmejoker340
    @youcancallmejoker340 2 месяца назад

    Thats an awesome vide. but can i ask why use windows?

  • @siosaiafonua9286
    @siosaiafonua9286 5 месяцев назад

    The question is, do i choose between VITE or Nextjs? I want to build a full stack big app

  • @danielrauhut239
    @danielrauhut239 Год назад

    Please rename this video, I was searching whether its possible to run a NextJS app on vite and you got my hopes up

  • @prashlovessamosa
    @prashlovessamosa Год назад

    Thanks dave

  • @MigalYaroslav
    @MigalYaroslav Год назад

    I like Vite and using for most of my projects

  • @luisbrazilva
    @luisbrazilva Год назад

    I get it. It's fast but why is everyone ignoring the huge security risk of exposing your API connections and key because it serves the JSX files in the network activity tab without masking them or encoding them.

  • @funtrap2289
    @funtrap2289 Год назад +2

    I have issue
    While save local host not re rendering
    I search in stack over flow then I added plugin in vite.config file even though it not resolved
    Please Share the solution

  • @krishnamurthyganeshb8543
    @krishnamurthyganeshb8543 11 месяцев назад

    you are awesome.

  • @changNoi1337
    @changNoi1337 Год назад

    I’m a little worried about using it for something serious.
    Like having trouble at the end building it and deploying.
    Do you think it is safe to use?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +4

      Yes, many devs are already using Vite. It is safe to use.

    • @changNoi1337
      @changNoi1337 Год назад

      @@DaveGrayTeachesCode Thanks Dave 😘

  • @OnePiece_Fandom
    @OnePiece_Fandom Год назад +1

    Sir can u plz tell me how can I use it with MERN app and it's safe for production and how can I do it ? Can u plz make a full video on this ?? ❤️❤️

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад

      This video should provide everything you need to use Vite - and yes, it is safe for production.

  • @ugurokur
    @ugurokur Год назад

    Hello Dave, can you tell me, what do you use Curly braces shower plugins

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад

      I'm not sure I understand your question, but I think you are asking how I get lines between my curly braces. If so, here is the answer: ruclips.net/user/shortsMDaxWffMjrQ

    • @ugurokur
      @ugurokur Год назад

      @@DaveGrayTeachesCode yes it is, thank you very much. You are an excellent person :)

    • @ugurokur
      @ugurokur Год назад

      @@DaveGrayTeachesCode okey last questions. what do you use screen resizing on your lessons ? you drag right then screen fullsize or dragging left side, window is minimize , how do you do it ?

  • @MeloGrigorian
    @MeloGrigorian Год назад

    If I'm using create-react-app, why should I use Vite when there's only one index.js file going into production anyway?? All these are for development mode correct?

  • @abdulrahmanagboolaosho3582
    @abdulrahmanagboolaosho3582 Год назад

    Thanks

  • @RahulKumar-fp1gy
    @RahulKumar-fp1gy Год назад

    Good evening/morning Dave,
    did you try "turbo" with NextJS??
    It is a new bundler by the developers of webpack and relatively faster than "Vite".

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      I have not yet, but I have heard about it as it was recently introduced at their conference. I'll give it a little time.

  • @NathanBudd
    @NathanBudd 10 месяцев назад

    I missunderstood this... how do you use Vite with NextJS?

  • @user-dz7cx8fp9i
    @user-dz7cx8fp9i 9 месяцев назад

    how to take build by rectifying errors and warnings in vite also ts

  • @user-te2pe5qm8o
    @user-te2pe5qm8o Год назад

    I tried VITE now, and it is faster, but I wondering if should I learn or use these new tools when just a few companies choose them, as I know, many companies still use jquery anyway, and you don't know it you can't get the offer.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      I do not recommend learning jQuery in 2023 unless you inherit a project that uses it at work. If you do, you should incrementally remove the jQuery dependency. Should you learn how to use Vite? Yes. It is always good to keep learning. The industry doesn't stop introducing new things.

    • @user-te2pe5qm8o
      @user-te2pe5qm8o Год назад

      @@DaveGrayTeachesCode Thanks for your advice!

  • @raheem81kg
    @raheem81kg Год назад

    appreciate it

  • @akintobby
    @akintobby Год назад

    Vite is the new cool✊

  • @imkir4n
    @imkir4n Год назад

    Does vite makes difference in the production?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      No, it's a development tool. It definitely saves time in dev. 💯

  • @AuxiliaryOfficial
    @AuxiliaryOfficial Год назад

    Agree

  • @anandraj1623
    @anandraj1623 Год назад

    How to upload the vite js project onto the docker

  • @martapfahl940
    @martapfahl940 Год назад

    Yes my Next(JS) project needs Vite lol :D

  • @huzaifac137
    @huzaifac137 Год назад

    But vite never installs on my PC because I have space in name of my windows user folder. Is their any solution to this?

    • @AmodeusR
      @AmodeusR Год назад

      Have you tried installing it with both npm and yarn? Because if not, unfortunately you would need to reinstall windows and this time around write your username without spaces or special characters.

    • @huzaifac137
      @huzaifac137 Год назад

      @@AmodeusR Yeah I think reinstalling windows is the only option unfortunately

    • @ahmad-murery
      @ahmad-murery Год назад

      @@huzaifac137 Why not trying to create a new user (without spaces) and then login using the new account and reinstall it from there

  • @fafbk7773
    @fafbk7773 Год назад

    Is it from vite labs ??

  • @sayedulkrm
    @sayedulkrm Год назад

    Hello I have a question. If anyone knows please answer.
    How can I run my Vite project in localhost:3000 ?
    Basically it run in 127.0.0.1:3000.

    • @brendencallahan242
      @brendencallahan242 Год назад

      They are the same thing. 127.0.0.1:3000 is localhost:3000.

  • @swastikpatro6436
    @swastikpatro6436 Год назад

    How to add eslint to this vite react typescript setup?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад

      Couple of links to help: stackoverflow.com/questions/71020035/setup-vite-template-react-and-eslint-airbnb
      and
      www.npmjs.com/package/vite-plugin-eslint

  • @coderboysobuj
    @coderboysobuj Год назад +1

    I have a problem vite with react router dom. It's not Working on server when refresh the page It's shows me server 404 page. I need solution,, please help me

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад +1

      It sounds like this is just a react router hosting issue where you need to set the redirect/rewrite rule on the host.

  • @abman1662
    @abman1662 Год назад

    They should mention the pronounciation on their site/git or soon it will be known as vyte.

  • @anish_dalvi
    @anish_dalvi Год назад

    Yes Vite is really a TIME SAVER

  • @rahmatyousefi8273
    @rahmatyousefi8273 Год назад

    Ok I found thank you

  • @tareq8022
    @tareq8022 Год назад

    with next js ??

  • @noir4356
    @noir4356 Год назад +1

    No doubt it was fast. "Vite" means "fast" in French 😺

  • @davronmaxmudov3972
    @davronmaxmudov3972 Год назад

    How about next js?

  • @nabinsaud4688
    @nabinsaud4688 Год назад

    I have already stopped using create react app

  • @shahriar.shourov
    @shahriar.shourov Год назад

    Where is the link??

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад

      vitejs.dev/

    • @shahriar.shourov
      @shahriar.shourov Год назад

      @@DaveGrayTeachesCode Discord Link?

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад

      @@shahriar.shourov for now, you can find it in the header of my channel banner or in the description of other recent videos. When I can I will add it to this one

    • @shahriar.shourov
      @shahriar.shourov Год назад

      @@DaveGrayTeachesCode Thanks For Your Reply!

  • @hawks2271
    @hawks2271 Год назад

    Nice🇧🇷

  • @LordFullStack
    @LordFullStack Год назад +1

    Vite is also for Server side rendering .
    Check this out
    ruclips.net/video/jPAzMP3A8R4/видео.html

  • @somebody-17546
    @somebody-17546 Год назад

    I use vite with ts, eslint, prettier

  • @AmodeusR
    @AmodeusR Год назад

    If I could ask you something, I would ask you to stop using create-react-app and use Vite instead for you videos. It's much faster, versatile and thus modern. It's a dream yet to become true, since I use it for the reasons said and sometimes it causes some confusion working on a vite project watching a create-react-app video class 😅

  • @user-gz2hz4rb9v
    @user-gz2hz4rb9v 9 месяцев назад

    if you like so much Vite, why waist time with garbage React, why not choose VUE?!!

  • @Pareshbpatel
    @Pareshbpatel Год назад

    This is an excellent introduction to Vite. Thanks, Dave
    {2023-03-15}, {2023-05-03}, {2023-06-23}

  • @mrngasa3415
    @mrngasa3415 Год назад

    Thanks a lot Dave 🤍

  • @abuhossain4274
    @abuhossain4274 Год назад

    sir what is your discord username ? pls give me

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Год назад

      My Discord server is linked in the description. I'm Dave Gray in the server and in real life 😀