React Server Side Rendering - Beginners Guide

Поделиться
HTML-код
  • Опубликовано: 12 янв 2025

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

  • @MonsterlessonsAcademy
    @MonsterlessonsAcademy  4 месяца назад

    WATCH NEXT: React Interview Questions and Answers - Dominate Your Next Interview - ruclips.net/video/yQHr4opz_N0/видео.htmlsi=51b2XP_84GH3q6oF

  • @vinitgupta1648
    @vinitgupta1648 9 месяцев назад +1

    Really loved how simple it was and so easy to understand

  • @whatthefuuuck
    @whatthefuuuck Месяц назад

    Thank you! This was exactly what I needed

  • @chris_and_music
    @chris_and_music 2 года назад +4

    Nice one, I've never tried this approach because I've always used Next JS, but it's great to know this too.

  • @animeshbhatt3383
    @animeshbhatt3383 10 месяцев назад +1

    Thanks for the video. So which is the better option? NextJS or Reactjs SSR? I don't see the pros and cons anywhere in the Internet.

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  10 месяцев назад +1

      The better option is to really question if you need ssr. 90% of website don't. It's either markup which can be rendered by any server on dynamic client app like trello with sockets, etc

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

    Great explanation, thanks!

  • @ShabeerAhamed-oi2rv
    @ShabeerAhamed-oi2rv Год назад

    greatly explained

  • @elchinmammadzade3007
    @elchinmammadzade3007 7 месяцев назад

    Can you provide some information on the deployment part? For example how to serve this ssr app with the help of AWS Lambda function

  • @m.denisnasution2071
    @m.denisnasution2071 5 месяцев назад

    This was amazing explanation, thank you, but i want to ask one question, if i want to deploy the react app to cpanel/share hosting, should i put the build folder in public_html folder or in Node js app server?

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

      No idea as I never used cpanel. From client only react you need to serve html as a static. For SSR you need a running node server

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

    i tried this but in latest version routing is not working with that images is also not working can you please guide how I solve this issue

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

    Hello sir, this is a great tutorial!
    I want to ask, can it be used for data dynamically or calling from an API?

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

      Yes we can.

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

      @@MonsterlessonsAcademy have you ever used vue ssr? Can vue ssr use data dynamically?

  • @INFINIX69
    @INFINIX69 2 года назад +1

    ERROR ---> when i click on about it the text changes to about but it shows cannot get /about when i check the page source but in case of home it is working fine

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

    Thanks for the tutorial, it was helpful. There is one thing i would like to point out here. Sitting on the /about route if i hit refresh button on the browser, I get an error "Cannot GET /about".
    Could you provide a solution to this?

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

      got same problem

    • @0xda03
      @0xda03 Год назад

      try changing the order of the two "app.use()" parts, then change the regex "^/$" of the now second one to "*"

  • @WhatEver-th8hl
    @WhatEver-th8hl Год назад

    I want to render some components from server or rest will be render in client

  • @shaileshchotoe
    @shaileshchotoe 8 месяцев назад

    can you make a video explaining why implementing the react router on the server doesnt do a full page refresh. or does it? when it does isnt the whole idea of single page application gone??

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  7 месяцев назад

      There is no magic. If it's server there is page refresh, if it's client we change content with js. With SSR the first render is server and then it's client only.

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

    to load assets we need webpack config?
    src/App.tsx:2:18 - error TS2307: Cannot find module './logo.svg' or its corresponding type declarations.

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

    Nice explanantion

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

    Cant we user rtk queries for cache management inside this ssr

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

      On ssr we just build markup and provide initial data that we fetched to the client. So not really.

  • @programister42
    @programister42 2 года назад +1

    Do you have plans to make a video about SSR on Angular? (I mean Angular Universal)

  • @lunner505
    @lunner505 7 месяцев назад

    Thanks bro 🙏

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

    Hey please help I'm getting an error of invalid hook and also you didn't show that you installed react and react-dom in the back-end and if I don't install these it's show error of requiring stack!

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

    can we have lazy loaded pages in this SSR of react app ?

  • @joshua.hintze
    @joshua.hintze 2 года назад

    I’m curious how well this works if your component you load has some useEffects with a async requests that would change the initial view

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  2 года назад +1

      useEffect is not called at all in rendering to string on backend as it happens after client render. You can use any additional functions or logic which will resolve requests before creating ssr html page.

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

    Very nice tutorial really help a lot. I am using the rtk query and now stuck as it is not fetching the provider and causing
    - SyntaxError: Cannot use import statement outside a module
    Can you help me with some code?

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

      Haha 3 months ago and now answer, I got the same issue

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

      @@martapfahl940 Haha 1 months ago and now answer, I got the same issue

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

    Unable to find the App file getting error "Error: Cannot find module '../src/App' "

  • @huntx...8573
    @huntx...8573 Год назад

    SyntaxError: Invalid or unexpected token getting this error dk why?

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

    This will render the entire React app on the server side so if you have big data on your React app the user will wait a long time. You need to ssr individual components only

  • @crazymallu14
    @crazymallu14 2 года назад

    can u pls make a video about react js chart with dropdown option using a API🙏

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  2 года назад

      I already have a video about react charts but without an api. ruclips.net/video/Gj0ZOr0N6Ck/видео.html

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

    Please use VS code for thr front-end IDE.

  • @sliceem88
    @sliceem88 2 года назад

    Nice tut !
    Do u have plans to do some SSR framework like Next, Remix and Gatsby comparison? Or maybe Best practices of SSR ? Or Workshop maybe ?

  • @g-luu
    @g-luu 2 года назад +2

    Is the channel about react now? Clicked so fast thinking its angular content.

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  2 года назад +4

      I was never intended to be just about Angular. It is anything related to web.

  • @ThietTruong-r8p
    @ThietTruong-r8p 4 месяца назад

    why you don't use ide, u using terminal , it's hard to see and comprehensive

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

    NextJS developers watching this: ☕
    seriously i just wanted to know how this is done, great video

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

    why do i get:
    const worker = new Worker(new URL("../../workers/imageWorker.js", import.meta.url));
    ^^^^
    SyntaxError: Cannot use 'import.meta' outside a module
    Help me please