🔥 NEW Material UI with NextJS 14 & React 18

Поділитися
Вставка
  • Опубліковано 15 вер 2024
  • Free Coding Courses: grepsoft.com/c...
    In this video I will show you guys how easy it is to use Material UI with Next JS. With a little bit of setup you can be up and running in no time. Since NextJS 14 uses App router you will learn about integrating mui with it the proper way.
    Not only that but we will cover advanced topics like custom material ui theme, how to create custom mui components and how to style a material ui component them using emotion.
    We will create a futuristic game menu to demonstrate the concept.
    code: github.com/gre...

КОМЕНТАРІ • 34

  • @banirezaie1970
    @banirezaie1970 8 місяців тому

    Your tutorial was really helpful, keep the good work up mate!

  • @logiccomputer8000
    @logiccomputer8000 6 місяців тому +1

    "use client" is used to declare a boundary between a Server and Client Component modules. This means that by defining a "use client" in a file, all other modules imported into it, including child components, are considered part of the client bundle.
    and your ThemeRegistry is a client component which then wrap all children so ??? how it can perform ssr

    • @Grepsoft
      @Grepsoft  6 місяців тому

      Please read this page: nextjs.org/docs/app/building-your-application/rendering/composition-patterns#using-context-providers you will understand the concept. Basically with the provider rendered at the root, all other Client Components throughout the app will be able to consume this context.
      One change I would make to the code is: {children}

  • @cuongnguyenchi5097
    @cuongnguyenchi5097 9 місяців тому

    Cảm ơn bạn đã làm các video về Material UI và React.

    • @Grepsoft
      @Grepsoft  9 місяців тому

      Can you please translate to English?

    • @thienquang3119
      @thienquang3119 8 місяців тому

      that means tks u for doing a video about Material UI and React@@Grepsoft

  • @B8Official
    @B8Official 9 місяців тому

    This video very good.

  • @aakashkharabe8561
    @aakashkharabe8561 9 місяців тому

    Hey can you make it one tutorial on full stack iOS App like UA-cam.
    But your content is so awesome.

    • @Grepsoft
      @Grepsoft  9 місяців тому +1

      I am working on an e-commerce AI chatbot for next video. So hopefully after that. But will take a while to make since it’s a big project.

    • @aakashkharabe8561
      @aakashkharabe8561 9 місяців тому

      ​@@Grepsoftsure

  • @distractos
    @distractos 7 місяців тому

    Not sure if its the latest version of nextjs but i cannot use the import "@mui/material" it says module not found even after installation

    • @Grepsoft
      @Grepsoft  7 місяців тому

      Please share your project and I can take a look.

  • @muhammadsalman5026
    @muhammadsalman5026 8 місяців тому

    Best Explanation! how i can use tailwind with mui and nextjs I follow many links but couldn't able to use tailwind everytime errors come any steps or suggestions

    • @Grepsoft
      @Grepsoft  8 місяців тому

      You can use the sx props when using mui. But I can try to come up with an example.

    • @muhammadsalman5026
      @muhammadsalman5026 8 місяців тому

      @@Grepsoft thanks I am looking forward to your example

  • @codedusting
    @codedusting 9 місяців тому

    I don't think you need fontsource if you are using next font right?

    • @Grepsoft
      @Grepsoft  9 місяців тому +1

      Not necessarily

  • @SumitSingh-wz3wt
    @SumitSingh-wz3wt 8 місяців тому

    mateail UI components increase the first Load JS size extremely when we run build command for production. Do you have any solution how can i reduce that.

    • @Grepsoft
      @Grepsoft  8 місяців тому

      Please see these tips for reducing bundle size: mui.com/material-ui/guides/minimizing-bundle-size/

  • @CarlosEstebanLopezJaramillo
    @CarlosEstebanLopezJaramillo 7 місяців тому

    Wait how come you can put MUI components in your page.tsx without the 'use client'; is it because I'm using SSR or maybe it has changed?

    • @Grepsoft
      @Grepsoft  7 місяців тому

      You only need “use client” if the component needs to interact with the DOM, use browser features or handle events etc.

    • @CarlosEstebanLopezJaramillo
      @CarlosEstebanLopezJaramillo 7 місяців тому

      @@GrepsoftI found later what the issue is, with the `nextConfig.compiler.emotion` set to true, its transforming my pages like if it had emotion code in it, so I had to add to my pages the comment `@jsxImportSource react`, basically my setup messes how I have to use `use client` a bit.

    • @CarlosEstebanLopezJaramillo
      @CarlosEstebanLopezJaramillo 7 місяців тому

      @@GrepsoftBasically either I mark which files are client components like usual, or like my current setup I assume 90% of my code will be client components so I have to mark which components are not with `@jsxImportSource react`, which most of the time is the case only for the `page.tsx` or `layout.tsx`.

    • @TopDoorInstall
      @TopDoorInstall 7 місяців тому

      @@CarlosEstebanLopezJaramilloactually when you bring a component make sure it’s coming from mui and not emotion. Sometimes when you type a component name and VS code show options to import it can bring emotion one.

    • @CarlosEstebanLopezJaramillo
      @CarlosEstebanLopezJaramillo 7 місяців тому +1

      ​ @TopDoorInstall Yes it does happen a lot when multiple modules have the same name, now I would be happier if there was an explanation somewhere about how the Next Config `compiler.emotion` worked, and how it affects SSR, RSC and client code, I went and disabled it because having to mark most files without hooks with `@jsxImportSource react` comment was a pain.

  • @tiavina-mika
    @tiavina-mika 8 місяців тому

    Thanks. The is no Git repository for this tuto?

    • @Grepsoft
      @Grepsoft  8 місяців тому

      I will upload

    • @Grepsoft
      @Grepsoft  8 місяців тому +1

      please check description. code uploaded.

  • @linuhusainnk
    @linuhusainnk 4 місяці тому

    Not able to use responsiveFont

    • @Grepsoft
      @Grepsoft  4 місяці тому

      Are you getting error?

  • @meoconhoccode
    @meoconhoccode 4 місяці тому

    could anyone help me do dark-light mode feature?

    • @Grepsoft
      @Grepsoft  4 місяці тому

      Check out this video for dark mode High Quality Dashboard React and Material-UI
      ua-cam.com/video/ziO6fWnNVgM/v-deo.html

  • @aymanjaber2585
    @aymanjaber2585 Місяць тому

    This just uses styled-components