Begginer Trouble in React imports

here’s my App.js

import './App.css';
import React from 'react';
import navBar from './navBar';
function App() {
  return (
    <div className="App">
      <navBar />
export default App;

here’s the one I’m trying to import navBar.js

import React from "react";
function navBar(){
some stuff
export default navBar;

it doesn’t read the navBar but reads when it’s called “Tweet” ← was the previous name of the function.

HI @cronie !

Welcome to the forum!

React components should start with a capital letter.

Instead of navBar which is camel case, it should be NavBar which is pascal case.


This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.