JavaScript Modules in 100 Seconds

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ม.ค. 2025

ความคิดเห็น • 145

  • @Fireship
    @Fireship  5 ปีที่แล้ว +474

    Sorry for dragging this one out to 104 seconds 😞

    • @lordswaggity1213
      @lordswaggity1213 5 ปีที่แล้ว +39

      Disliked for the extra 4 seconds! 😠
      Lol jk good job 👌

    • @incarnateTheGreat
      @incarnateTheGreat 5 ปีที่แล้ว +12

      (proceeds to file a complaint)

    • @misode
      @misode 5 ปีที่แล้ว +15

      Not acceptable... Unsubscribing

    • @luke77408
      @luke77408 5 ปีที่แล้ว

      I really like this type of Videos. When the next episode would be available

    • @gigos2
      @gigos2 5 ปีที่แล้ว +1

      i get why people like these type of videos but i dont get who they are, i mean, what is their programming level. because for me, it's not very high level and i find these type of videos really waste of time. because i'd rather you make a 15-30min video that REALLY explains it and not just rushing through it.. It seems that you are explaining these to people who already know these.. You know what i mean? well.. i hope you do.

  • @himynameisoleg
    @himynameisoleg 5 ปีที่แล้ว +121

    Didn’t know about the tree shaking, learned something new in 100 seconds

    • @Fireship
      @Fireship  5 ปีที่แล้ว +12

      Mission accomplished :)

    • @jeffery_tang
      @jeffery_tang 5 ปีที่แล้ว +3

      When you take it literally it sounds stupid

    • @yt-sh
      @yt-sh 3 ปีที่แล้ว

      @@Fireship thanks for rreferring Samantha, she makes cool contents ...too :)

    • @dannnsss8034
      @dannnsss8034 2 ปีที่แล้ว

      It's just importing what you need 🤷‍♂️🤦

    • @sanjeevdandin9350
      @sanjeevdandin9350 11 หลายเดือนก่อน

      ​@@dannnsss8034 js devs who are from these backgrounds like below never know about the tree shaking feature of JS.
      1. Only used CommonJs till now.
      2. Only worked on JQuery
      3. Only worked on VanillaJs with embedding libraries in head tag where import export isn't necessary.
      4. Is a newbie to the language in itself.
      5. Is a backend dev and only uses/knows JS for basic frontend stuff.

  • @SkullJack-n2c
    @SkullJack-n2c 7 หลายเดือนก่อน +1

    It's 100 seconds of information and 4 seconds of saying thanks. No click bait. Perfect.

  • @FlyingPenguino
    @FlyingPenguino 5 ปีที่แล้ว +24

    I recommend covering various programming patterns (MVC, DDD, Observer pattern, Adapter pattern, etc...).
    *Keep up the amazing work Jeff!* 🔥🔥🔥

    • @FCK4FD69
      @FCK4FD69 3 ปีที่แล้ว +3

      My name is Jeff

  • @nickersonlauriston1582
    @nickersonlauriston1582 2 ปีที่แล้ว +2

    It is MIND BLOWING, how you were able to teach that in 1 MINUTE. I've been trying to do a successful import for like an hour, and I finally got it right from a 1minute video. That's INSANE! Thanks!!! I want to purchase merch now !!! Lol.

  • @Brunoenribeiro
    @Brunoenribeiro 5 ปีที่แล้ว +14

    This channel is probably the most underrated dev channel on TH-cam. Your videos are always insightful and fun! I always share them :)

    • @Flrere
      @Flrere 10 หลายเดือนก่อน

      Fireship is now the most watched dev channel on TH-cam

  •  5 ปีที่แล้ว +15

    When I started to follow Samantha Ming I notice some similarity with Fireship because the way of using emojis. Now everything makes sense!! 😊💫💻

  • @kingbeencent
    @kingbeencent 5 ปีที่แล้ว +4

    I was waiting for this the entire 2019, love you now, thank you very muchhhh

  • @MrDots99
    @MrDots99 5 ปีที่แล้ว +7

    By far my favourite coding channel on youtube. Love every video, keep it up!

  • @ibrahimyosif
    @ibrahimyosif 2 ปีที่แล้ว +1

    damn it's crazy to see how much you've changed over the time and becoming much better at making videos.

  • @stith_pragya
    @stith_pragya ปีที่แล้ว +1

    Thank You So Much for this wonderful video.....🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻

  • @the_primal_instinct
    @the_primal_instinct 5 ปีที่แล้ว +235

    Clickbait, the video is 104 seconds

    • @avi12
      @avi12 5 ปีที่แล้ว +9

      Actually, it's pure 100 seconds, excluding the intro & outro

    • @prabhatkumar3125
      @prabhatkumar3125 5 ปีที่แล้ว

      In extra seconds you will found intro and outro.

    • @FrameDrumAndFlute
      @FrameDrumAndFlute 5 ปีที่แล้ว

      NBD

    • @randomuser6880
      @randomuser6880 2 ปีที่แล้ว +1

      😂

  • @NicolaiWeitkemper
    @NicolaiWeitkemper 4 ปีที่แล้ว +2

    The bad thing about these videos being so short is that I hardly have enough time to upvote, before the next one in your awesome playlist starts. :)

  • @MiteshPrajapati14091985
    @MiteshPrajapati14091985 3 ปีที่แล้ว +1

    So it takes just 100 secs to learn about JavaScript modules :) Great content.

  • @jomy10-games
    @jomy10-games 3 ปีที่แล้ว +1

    It all makes sense now!

  • @jul1us.05
    @jul1us.05 3 ปีที่แล้ว +1

    dang your voice changed. I love your videos, respect man

  • @frankeke8541
    @frankeke8541 5 ปีที่แล้ว +9

    I love this series, although I havent learned anything from it yet

    • @Fireship
      @Fireship  5 ปีที่แล้ว +8

      I have ideas for more advanced topics that might surprise you...

    • @frankeke8541
      @frankeke8541 5 ปีที่แล้ว

      @@Fireship Can't wait

  • @scyllado3769
    @scyllado3769 2 ปีที่แล้ว +1

    I started learning web development, I learnt that something like this was possible,
    but no matter what i tried, it just won't import
    and then i found out that i need to import the main.js file in html with the "module" type :O
    work like a charm

  • @Markkkkkkkkkkkkkkkkk
    @Markkkkkkkkkkkkkkkkk 4 ปีที่แล้ว +5

    I'm 15
    My passion is computer science
    I already finished HTML5 and CSS
    Still finished Bootstrap3 as a framework for for HTML5
    Now I'm studying JS, I arrived at the part of modules, promises, Iterators and generators....
    And your explanation had actually solved one problem... You earned a sub, I'll definitely need your help problem in the future when I enter a university... Keep up the your vids!!!

    • @elia552
      @elia552 ปีที่แล้ว

      Update?😀

    • @arjolbelishta
      @arjolbelishta ปีที่แล้ว

      @@elia552 Boyyyy you got a future!!!!

  • @anisulfatma8943
    @anisulfatma8943 4 ปีที่แล้ว +1

    The 'Hyper Syntax' is too amazing

  • @ionk3588
    @ionk3588 5 ปีที่แล้ว +1

    That is a good idea!!! why I didn't think of that??? Gonna use it right now! Thank youuuuuuu 😁

  • @spatialnasir
    @spatialnasir 9 หลายเดือนก่อน

    Thanks for explaining that the require function in node is syntactic sugar for es6 import statement.

  • @n0noob1
    @n0noob1 4 ปีที่แล้ว +1

    Very informative ! Full of information !

  • @imtanuki4106
    @imtanuki4106 3 ปีที่แล้ว +1

    you nailed it.

  • @NerveClasp
    @NerveClasp 5 ปีที่แล้ว +1

    I wish this series had a doppelganger of videos longer in lenght with a more in depth explanation and gotchas of sorts, say a standard (at the moment) 10 minute videos
    A very good series nevertheless, thanks a billion!

  • @kxmode
    @kxmode 3 ปีที่แล้ว +1

    I sincerely hope Visual Studio 2019 has support for this. It's been a PITA to work with for compile SASS. I have to use Visual Studio Code because Microsoft thought it would be keen not to include support for ANY CSS preprocessor scripting languages. 😟 Also, subbed for ~100 seconds of actual learning. 🙂👍

  • @shikharawasthi
    @shikharawasthi 5 ปีที่แล้ว +1

    Video is very knowledgeable.Leaened something new. By the way which extension you use for emojis in vscode.

  • @ChongHwi
    @ChongHwi 5 ปีที่แล้ว +1

    This is really what I want

  • @hulladek3
    @hulladek3 5 ปีที่แล้ว +1

    I suggest using esm npm module, cause otherwise you have to use many flags in with node.

  • @ffk2451
    @ffk2451 4 ปีที่แล้ว +1

    so informative, thanks!

  • @Davidovich_aka_smoozydrinker
    @Davidovich_aka_smoozydrinker 5 ปีที่แล้ว +1

    awesome explanation!

  • @canvaapplessons1224
    @canvaapplessons1224 5 ปีที่แล้ว +2

    Please please make a video on locally synchronising firestore data (upload to cloud when internet is on).
    Preferably using: ionic, epubjs, sqlite
    Or at least give a hint.

  • @TheNewton
    @TheNewton 5 ปีที่แล้ว +1

    Really looking forward to this format being a continuing trend in 2020 there is just so much bloat in explainer vids for web development features.

  • @jediampm
    @jediampm 5 ปีที่แล้ว +1

    if you are not using a bundler like parceljs or webpack or rollup, you will need to add the js extension ( in case of a browser) or mjs ( in case of nodejs). this is important because on your examples when importing you didnt add the extension of the file as weel in the source site that give us at the description: modules sheet cheat.
    And other important thing: you didnt show how to tell to js script tag in the browser how that js file will load and in sheetcheat allso dint mention that too, if you are not using a bundler.

  • @JustinK0
    @JustinK0 3 ปีที่แล้ว

    damn, was hoping to get more info on 'Require' vs dynamic importing

  • @vishnunair9933
    @vishnunair9933 3 ปีที่แล้ว

    Have you discontinued the videos in the series "That weird JavaScript Course"?

  • @Jonasgamertv
    @Jonasgamertv 2 ปีที่แล้ว

    Thank you!

  • @FlorianMaeder
    @FlorianMaeder 3 ปีที่แล้ว

    0:30 I think you're confusing RequireJS (AMD) and CommonJS.

  • @sabuein
    @sabuein 2 ปีที่แล้ว

    Thank you.

  • @jonathonchambers6460
    @jonathonchambers6460 5 ปีที่แล้ว

    I absolutely love your videos! Do you have a patreon?

    • @Fireship
      @Fireship  5 ปีที่แล้ว +1

      Thank you! The best way to support is with a pro membership, which provides access to more content fireship.io/pro/

  • @kevintale2608
    @kevintale2608 5 ปีที่แล้ว

    I didn't know renaming modules would enable tree shaking. Good to know :)

    • @Fireship
      @Fireship  5 ปีที่แล้ว

      Renaming does't enable tree-shaking. It's up to the module to export code in small dependency-free pieces, usually as named exports.

    • @kevintale2608
      @kevintale2608 5 ปีที่แล้ว

      @@Fireship Oh, I understood that as renaming exports makes the module tree shakable. Isn't that what you are explaining at 1:15 ?

    • @SirusStarTV
      @SirusStarTV 5 ปีที่แล้ว

      @@kevintale2608 He says that when importing named exports instead of all exports it's possible to make it tree-shakable.

  • @sagnikpradhan3594
    @sagnikpradhan3594 5 ปีที่แล้ว

    Good Video 👌

  • @th1nhng0
    @th1nhng0 5 ปีที่แล้ว

    Thank you so much

  • @pattmayne
    @pattmayne 9 หลายเดือนก่อน

    I still haven't made sense of modules. I read about them for hours... but whenever I try to import a JS file into another JS file, everything breaks. And if I declare a JS file to be a module in the HTML, then it doesn't work anymore. This explained nothing.

  • @leondu
    @leondu 5 ปีที่แล้ว

    I feel the 100s serie will be the main format

  • @ВиталийПетрушков-у8ф
    @ВиталийПетрушков-у8ф 4 ปีที่แล้ว

    Cool format!

  • @happyv6872
    @happyv6872 5 ปีที่แล้ว +3

    I know it says 100 second on the title, but I was still pretty surprised it ended quickly. LOL

  • @tGoldenPhoenix
    @tGoldenPhoenix ปีที่แล้ว

    Thanks!

  • @ravuladileep3814
    @ravuladileep3814 4 ปีที่แล้ว

    can you please make videos on angular ngrx(store managment)

  • @ignitedroads
    @ignitedroads 3 ปีที่แล้ว

    wonderfull channel

  • @Markkkkkkkkkkkkkkkkk
    @Markkkkkkkkkkkkkkkkk 4 ปีที่แล้ว

    Wait, so node.js is written in a file alone
    And react.js for example is in another file alone too
    And modules are these codes accessed inside other files?

  • @gokulkishan8802
    @gokulkishan8802 5 ปีที่แล้ว

    Thanks a lot dude

  • @curtdp
    @curtdp 5 ปีที่แล้ว +2

    isn't it actually CommonJS modules in node? not RequireJS

    • @transmissions1135
      @transmissions1135 5 ปีที่แล้ว +1

      Игорь Олейник yep

    • @MatthewChenIsAwesome
      @MatthewChenIsAwesome 5 ปีที่แล้ว

      Игорь Олейник right now I’m using imports in my nodejs package. Should I use Babel or can I expect others to just use import syntax?

    • @curtdp
      @curtdp 5 ปีที่แล้ว

      @@MatthewChenIsAwesome i think it's normal until you understand that it works only in node 13
      And i don't know the topic of how packages can interact if one uses require and other import...

    • @MatthewChenIsAwesome
      @MatthewChenIsAwesome 5 ปีที่แล้ว

      Игорь Олейник I’m pretty sure you can import old require packages, but you must use import syntax when importing new modules. I ended up opting for Pika Pack; maybe eventually I can skip Pika, but for now, I think most people are not yet on Node 13

  •  5 ปีที่แล้ว

    Thanks

  • @MrJaminbrad
    @MrJaminbrad 5 ปีที่แล้ว

    What are your thoughts on parcel vs webpack vs for bundling modules?

    • @Fireship
      @Fireship  5 ปีที่แล้ว +1

      I use rollup for all of my OS libraries because of it's simplicity, but Webpack can make more sense for frontend bundles that include JS/CSS/HTML. Not much experience with parcel, but I hear good things.

    • @SirusStarTV
      @SirusStarTV 5 ปีที่แล้ว

      @@Fireship parcel is basically zero-config bundler.

  • @wilfredv1930
    @wilfredv1930 5 ปีที่แล้ว

    nice format

  • @Yash-fz7kw
    @Yash-fz7kw 4 ปีที่แล้ว

    How do you make such awesome and edit it, please share.

  • @adamtak3128
    @adamtak3128 5 ปีที่แล้ว

    What theme are you using in your text editor?

    • @superchillh3o
      @superchillh3o 5 ปีที่แล้ว

      Adam Tak almost 100% sure it’s atom one dark but for vscode

  • @TheCass240
    @TheCass240 5 ปีที่แล้ว

    More of these!!!!!!!!!

  • @ionk3588
    @ionk3588 5 ปีที่แล้ว

    So can you export functions with it?

  • @javierrenteria3195
    @javierrenteria3195 5 ปีที่แล้ว

    Wao! Thanks a lot!

  • @augustoliver2779
    @augustoliver2779 5 ปีที่แล้ว

    Hi. Any Udemy courses? Thanks

  • @oiojin831
    @oiojin831 3 ปีที่แล้ว

    So why do we normally use esm for frontend and cjs for backend? is there any reason for this?

  • @malikbrahimi7504
    @malikbrahimi7504 4 ปีที่แล้ว

    Why is Chrome's V8 engine allow ES modules in vanilla JS but somehow you can't do it in Node.js which is built on V8? And as far as I know it is still not supported as stated in the video. Rather they just took out the warning.

  • @AceixSmart
    @AceixSmart 5 ปีที่แล้ว

    CommonJS not require JS @0:28

  • @tranquillityEnthusiast
    @tranquillityEnthusiast 5 ปีที่แล้ว

    Is ionic good for enterprise applications??....

    • @Fireship
      @Fireship  5 ปีที่แล้ว

      It depends more on the type of mobile app and the budget. True native apps are usually higher quality, but require a larger investment.

    • @tranquillityEnthusiast
      @tranquillityEnthusiast 5 ปีที่แล้ว

      @@Fireship it's a simple e-commerce app

  • @sleepingtiger4436
    @sleepingtiger4436 ปีที่แล้ว

    so does an import automatically translate to an http GET for that file? i assume not because the file must be loaded by browser to recognize the export in the first place, sp then why have the import/export?

  • @abdulelahaljeffery6234
    @abdulelahaljeffery6234 5 ปีที่แล้ว

    named export is tree shakable; so is default export *not* tree shakable?

  • @zakariachahboun
    @zakariachahboun 5 ปีที่แล้ว

    thanks but import statement in node version 13 is not working

  • @devluz
    @devluz 5 ปีที่แล้ว

    Don't you have to write "import cool from './package.js'. If I try it without the .js the browser is mad at me.

  • @cprn.drifts
    @cprn.drifts ปีที่แล้ว

    And how to import a file that doesn't export anything, just modifies some global state?

  • @4ngling
    @4ngling 22 วันที่ผ่านมา

    where's the memoization video???

  • @krishnaprasath2975
    @krishnaprasath2975 5 ปีที่แล้ว

    I came to realize how inattentiveI am when your video ends just like that without me understanding anything.

    • @Fireship
      @Fireship  5 ปีที่แล้ว +2

      I will allow you to watch it again at no additional charge ;)

  • @ucmRich
    @ucmRich 5 ปีที่แล้ว

    More like this please ^_^

  • @mohamaddavidsoufan7545
    @mohamaddavidsoufan7545 5 ปีที่แล้ว

    Do u know a good website where I can find designs
    I want to build a web app but can’t design anything. If there is a library where a UX designer has a pre built designs for an app that I can turn it into a real thing I would appreciate it

  • @CarlosWashingtonMercado
    @CarlosWashingtonMercado 3 ปีที่แล้ว

    Good.

  • @VictorBanerjeeF
    @VictorBanerjeeF 5 ปีที่แล้ว

    What ide you are using?

    • @SirusStarTV
      @SirusStarTV 5 ปีที่แล้ว +1

      He's using *Visual Studio Code*

  • @Salehalanazi-7
    @Salehalanazi-7 5 ปีที่แล้ว +2

    Watched in 2x so It's 50 seconds gg

  • @agent-33
    @agent-33 3 ปีที่แล้ว

    Why not just re-use the code by copy-paste?

  • @meco
    @meco 5 ปีที่แล้ว

    How do you do the live debug on your ide?

    • @Fireship
      @Fireship  5 ปีที่แล้ว +2

      Quokka vscode plugin

    • @salemexpress3014
      @salemexpress3014 5 ปีที่แล้ว

      @@Fireship going to try it.

  • @VMzaVAS
    @VMzaVAS 5 ปีที่แล้ว

    Nice

  • @Grummpyro
    @Grummpyro 5 ปีที่แล้ว

    Now I understand what it does but have 0 clue how to use it.

  • @jrdnrc
    @jrdnrc 5 ปีที่แล้ว

    Did in a minute and half what other youtubers take 10:04 min to explain

    • @swyxTV
      @swyxTV 5 ปีที่แล้ว

      Jordi Enric but how else would you know to like and subscribe and ring the bell? also sign up for skillshare

  • @kissu_io
    @kissu_io 5 ปีที่แล้ว

    🔥 🔥 🔥

  • @blackpilledbuddha4944
    @blackpilledbuddha4944 5 ปีที่แล้ว

    Make a video on JavaScript blob

  • @Donald__67a1
    @Donald__67a1 6 หลายเดือนก่อน

    Alas! A system error resulted in the transaction being sent to an invalid email address!

  • @________.pathfinder
    @________.pathfinder 4 หลายเดือนก่อน

    wow

  • @muhamadimron9785
    @muhamadimron9785 5 ปีที่แล้ว

    Woops, 104 secs..

  • @va9if
    @va9if 3 ปีที่แล้ว

    1:29 : Says Chi Chi
    comes an asian women
    hmmm....

  • @thevividversatilechannel4807
    @thevividversatilechannel4807 9 หลายเดือนก่อน

    100 = 10^2
    144 = 12^2

    • @Nick12_45
      @Nick12_45 9 หลายเดือนก่อน +1

      Least random youtube comment:

  • @mapengbo0314
    @mapengbo0314 5 ปีที่แล้ว

    where's my promise

  • @carlosraul6578
    @carlosraul6578 4 ปีที่แล้ว +1

    greats if your english skills are very good 🙄

  • @bradyward5741
    @bradyward5741 5 ปีที่แล้ว

    :3

  • @AnthonyObi-wr6ro
    @AnthonyObi-wr6ro ปีที่แล้ว

    i can't understand anything! You were very fast