Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Components in next.js are not showing

Samer Saber answered on April 7, 2023 Popularity 3/10 Helpfulness 1/10

Contents


More Related Answers

  • window is not define Nextjs
  • localbase does not work with nextjs
  • favicon in next js not working
  • referenceerror next is not defined
  • window is not defined Next Js
  • Next js window is not defined solution
  • ReferenceError: window is not defined nextjs
  • next js css not working
  • nextjs error can not find next/bable
  • referenceerror: nextui is not defined
  • window in not defined in nextjs

  • Components in next.js are not showing

    1

    Make sure that your components folder is under the project folder directory, and that your custom component file is under components folder.
    Also, the name of your custom components file should always start with capital letters.
    for example: 'Navbar.js' and not 'navbar.js'


    Notice that the first letter of the name of the function is also in capital format.

    Then,

    Under 'pages' folder, inside the '_app.js' file you should include the tag of your component:

    Notice that we imported the Navbar in the first line.

    Popularity 3/10 Helpfulness 1/10 Language javascript
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Apr 07 2023
    Samer Saber
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.