React Internals Deep Dive 1 - Hello World! Debugging

Ғылым және технология

Hi, this is the first video of me Reading React Source Code through debugging,.We debug the simplest Hello World with breakpoints, and see the relations between functions.
By the end of this video, you will know the general internals of how ReactDOM.render() works for the basic usage. Also we left a lot of puzzles which are to be solved in other videos.
check out my series of React source code walkthrough jser.dev/series/react-source-...
Overview is here jser.dev/2023-07-11-overall-o...
Memo for this part is here: raw.githubusercontent.com/JSe...
Hi I'm a JavaScript engineer who is not good at algorithms,
and currently practicing leetCode & BFE.dev. If you are interested, maybe we can learn together.

Пікірлер: 80

  • @nguyentruong1812
    @nguyentruong1812 Жыл бұрын

    Thank you, this is a gem for those who genuinely want to learn how React works behind the scene

  • @JSerJSer

    @JSerJSer

    Жыл бұрын

    Thanks! you made my day

  • @DemystifyFrontend
    @DemystifyFrontend6 ай бұрын

    Thanks jser, this is really awesome and i have no words how glad i am finding this content and enjoying learning in and out of react

  • @jonfit2392
    @jonfit23923 жыл бұрын

    This is freaking COOL. Great job. Keep going, man.

  • @dannyisrael
    @dannyisraelАй бұрын

    Been looking for this!!

  • @JSerJSer

    @JSerJSer

    Ай бұрын

    sorry to keep you looking!

  • @hungphung6738
    @hungphung6738 Жыл бұрын

    This is awesome, I'm on the journey of deep diving into React internals, thank you for sharing this!

  • @cyzheng6760
    @cyzheng67608 ай бұрын

    great job. I leaned a lot

  • @howard1687
    @howard16873 жыл бұрын

    love this walkthrough, keep it up

  • @mohamedmohiey1172
    @mohamedmohiey11723 жыл бұрын

    Thanks a lot man, this is much better than hundreds of react projects playlists available on this site, this is a truly unique content.

  • @JSerJSer

    @JSerJSer

    3 жыл бұрын

    Glad I can help. Actually I learned so much from making this video

  • @jingsu9551
    @jingsu95513 жыл бұрын

    Thank you! I've learned a lot, love this walkthrough :))

  • @JSerJSer

    @JSerJSer

    3 жыл бұрын

    Glad it helps~

  • @lucashan4193
    @lucashan41932 жыл бұрын

    OMG why am i watch this video yet? Thank you, I have learned a lot.

  • @user-sr9kn1bw7k
    @user-sr9kn1bw7k9 ай бұрын

    good share!

  • @maharshiguin7813
    @maharshiguin781326 күн бұрын

    Thank you so much for your work, i always wanted to know how react worked behind the scenes but the source code seemed intimidating, this is perfect

  • @JSerJSer

    @JSerJSer

    26 күн бұрын

    This debugging video is pretty rough, check of my React Internals Explorer jser.pro/ddir/rie?reactVersion=18.3.1&snippetKey=hq8jm2ylzb9u8eh468

  • @ShibasisPatnaik
    @ShibasisPatnaik5 ай бұрын

    Incredible, add a thanks button. This is exceptional content

  • @timzhao8974
    @timzhao89742 жыл бұрын

    This is so cool, how I wish my English was at a level where I could understand it...

  • @BlueSkyVL158
    @BlueSkyVL158 Жыл бұрын

    Very deep understand how to react works. Thanks a lot JSer

  • @JSerJSer

    @JSerJSer

    Жыл бұрын

    you made my day, check out my full series jser.dev/series/react-source-code-walkthrough

  • @erenkara6503
    @erenkara65032 жыл бұрын

    Thank you for doing this. It's really great.

  • @JSerJSer

    @JSerJSer

    2 жыл бұрын

    Glad it helps

  • @user-bs9mb9oc7f
    @user-bs9mb9oc7f2 жыл бұрын

    An awesome React journey. Chinese Frontend Developer Here. Hope there are more videos like this.👍

  • @timzhao8974

    @timzhao8974

    2 жыл бұрын

    哇哦,羡慕你英语真好。

  • @troika_473h
    @troika_473h3 жыл бұрын

    I cant believe this exists. This is so amazing. I hope you know how great this service is. What you are doing is amazing for us junior developers. Thank you so much.

  • @JSerJSer

    @JSerJSer

    3 жыл бұрын

    Hi fanatic, so glad it helps. Yeah, I'm also junior developer ~

  • @kostas_x

    @kostas_x

    2 жыл бұрын

    Junior and senior developers alike! Amazing work. Thank you!

  • @GauravKumar-ue7nz
    @GauravKumar-ue7nz9 күн бұрын

    Thank you

  • @JSerJSer

    @JSerJSer

    9 күн бұрын

    You're welcome!

  • @ShibasisPatnaik
    @ShibasisPatnaik5 ай бұрын

    Thanks

  • @JSerJSer

    @JSerJSer

    5 ай бұрын

    Thank you for your thanks!

  • @lulusaikou221
    @lulusaikou2212 жыл бұрын

    It's difficult for me to learn React source code. I don't understand many thing even after watching this video because I just written some simple react demos so far. But your video is really awesome and encourages me to learn React source code.Thank you very much!!! At least I know how to debug react now~🔥🔥🔥

  • @JSerJSer

    @JSerJSer

    2 жыл бұрын

    Rome is not built in a day. I started with knowing nothing about React internals and here I am, hang on and don't give up

  • @frankli5954
    @frankli59542 жыл бұрын

    Thanks for your video, I will start my React source code walk through😂

  • @JSerJSer

    @JSerJSer

    2 жыл бұрын

    Awesome, looking forward to seeing yours

  • @user-by3ld3bd7l
    @user-by3ld3bd7l Жыл бұрын

    Amazing!

  • @TajAlasfiyaa
    @TajAlasfiyaa2 жыл бұрын

    I started code in 10 Feb 2022, react in April and know I watch your videos

  • @JSerJSer

    @JSerJSer

    2 жыл бұрын

    Welcome and good luck to your developer career

  • @TonyTony-kx6mr
    @TonyTony-kx6mr3 жыл бұрын

    awesome !!!!! thanks

  • @huacai9536
    @huacai95362 жыл бұрын

    Thanks, Buddy, a lot.

  • @tananyGeek
    @tananyGeek3 жыл бұрын

    Surprise!! You are a boss, really

  • @JSerJSer

    @JSerJSer

    3 жыл бұрын

    haha , wanna be a boss , not yet though

  • @Mwila
    @Mwila2 жыл бұрын

    Noice 👌👌

  • @Gamma565
    @Gamma565 Жыл бұрын

    thank you so much for your video! I tried to redo what you have done in the video but I cannot track my functions flow in the waterfall as they all renamed and became like Ds, Ms, Ja ...... I think it is because of webpack and it help me to renamed my functions ?! may I know how can I have my original function name revealed in the waterfall ?

  • @youkyf4302
    @youkyf43027 ай бұрын

    I want to debug the source code like you, but I can't see the specific function names in my call stack. Most of them are anonymous. What's the reason? The react version I am using is 18

  • @stevenlee8293
    @stevenlee82932 жыл бұрын

    nice video!

  • @JSerJSer

    @JSerJSer

    2 жыл бұрын

    Thank you! Cheers!

  • @ishanksharma9051
    @ishanksharma90512 жыл бұрын

    hi at 8:43 you say element is JSX representation, it should be element is React element as object, and i think (not 100% sure) $$typeof is used to have a unique key for every element, which helps differentiate two different type of lets say div,p,buttons etc, it also helps in xss by preventing serialization and deserialization of react component in an unsafe manner

  • @JSerJSer

    @JSerJSer

    2 жыл бұрын

    "type" is used to different element type, $$typeof is for type of fiber node, you can find all the list here github.com/facebook/react/blob/main/packages/shared/ReactSymbols.js#L16-L32 things like REACT_PROVIDER_TYPE, REACT_SUSPENSE_TYPE

  • @howhow698
    @howhow6983 жыл бұрын

    What react version you used in these videos? Thanks for creating great contents!

  • @JSerJSer

    @JSerJSer

    3 жыл бұрын

    Until the video of Transition, it is 17

  • @kaiwenxiao7728

    @kaiwenxiao7728

    Жыл бұрын

    @@JSerJSer Hi, can you tell which version completely? Thanks!

  • @richardhu8971
    @richardhu8971 Жыл бұрын

    Could you provide the source code about the video, tks for your work!

  • @vivi-wx3fv
    @vivi-wx3fv2 жыл бұрын

    which version is your react source code,I download the v16.14, it seem a little different

  • @JSerJSer

    @JSerJSer

    2 жыл бұрын

    it was 17 I believe, well we should look at 18

  • @frankhuang3507
    @frankhuang35072 жыл бұрын

    I love you

  • @eret-hz9ih
    @eret-hz9ih2 жыл бұрын

    hi i download the latest react from website and followed your step, there is not "render" phase in performance waterfall, only "Evaluate Script", how can I see all these function calls of react.development.js edit: there is weird! the function calls only show "Evaluate Script" or "Compile Script" in Chrome(I disabled all extensions), but seems ok in Chromium

  • @JSerJSer

    @JSerJSer

    2 жыл бұрын

    I guess you are trying production build? you can try the dev build

  • @zemingtai733

    @zemingtai733

    2 жыл бұрын

    @@JSerJSer Still got this issue with a dev build.😵‍💫

  • @qianqian-dc3gr

    @qianqian-dc3gr

    Жыл бұрын

    me too

  • @mayanksavaliya9100
    @mayanksavaliya91002 жыл бұрын

    Performance logs at 4:21 in my case does not have that entire subtree after AppendChild. I dont know why....In your video the tree after AppendChild > Evaluate Scrip > (anonymous) > render > .... certain depth. But for me, my performance chart only shows Evaluate Script > Compile Code(so many of this tasks at this level) and nothing beyond this depth. Need some help @JSer

  • @JSerJSer

    @JSerJSer

    2 жыл бұрын

    what build are you trying ? you should try the dev build, rather than the prod build

  • @mayanksavaliya9100

    @mayanksavaliya9100

    2 жыл бұрын

    @@JSerJSer React 17.0.0-dev and the Steps I did 1) Cloned repo 2) Checked out to this 17.0.0-dev branch 3) ran "yarn install" 4) and then did "yarn build react/index,react-dom/index --type=UMD" 5) Opened dev.html file from fixtures/packaging/babel-standalone/dev.html Am I missing something?

  • @JSerJSer

    @JSerJSer

    2 жыл бұрын

    oh, yeah I can reproduce it... but I don't know why it is changed.... need to figure it out would you mind raise it in our discord channel ? we might get help from the community discord.com/channels/939144723023679579/939144723023679584

  • @mayanksavaliya9100

    @mayanksavaliya9100

    2 жыл бұрын

    @@JSerJSer I will. Thanks

  • @zemingtai733

    @zemingtai733

    2 жыл бұрын

    @@JSerJSer The discord channel seems not valid anymore. Any update?

  • @ravikumar-sharma-k
    @ravikumar-sharma-k16 күн бұрын

    Hi Jser, How did you open dev.html after build step?

  • @JSerJSer

    @JSerJSer

    9 күн бұрын

    I think html has nothing to do with build step? does this post help ? jser.dev/2024-07-01-esm-react/

  • @ravikumar-sharma-k

    @ravikumar-sharma-k

    9 күн бұрын

    @@JSerJSer yes, it did help, I found it, the earlier build steps didn't work because of new react version. Thanks

  • @akh254
    @akh2542 жыл бұрын

    Can u share some other similar source code walkthrough video or Blog s

  • @JSerJSer

    @JSerJSer

    2 жыл бұрын

    Hi Akh, what do you want to know about? maybe I can give it a shot

  • @rachitshukla30
    @rachitshukla302 ай бұрын

    Is this still valid in 2024? Or the code has changed already?

  • @JSerJSer

    @JSerJSer

    2 ай бұрын

    I think the basic architecture didn't change.

  • @rachitshukla30

    @rachitshukla30

    2 ай бұрын

    Thank you 😊

  • @zhangkaichen6226
    @zhangkaichen62263 жыл бұрын

    From BFE.DEV discussion to here, your channel is definitely underestimated! :)

  • @JSerJSer

    @JSerJSer

    3 жыл бұрын

    Hi glad to hear that!