So, I am trying to export this function to my main React App.js folder but it works only when the function name is in Uppercase. This is very strange since I have never encountered this behavior. This is the code that does not work:
export const family = () => {
return <p>gfdgdfgfdgdfgdf</p>;
};
import import { family } from "./PersonInfo/PersonInfo.js";
//in my class component in App.js I am using this JSX: <family/>
However, when I try this code, it works:
export const Family = () => {
return <p>dfgfdgfdgdf</p>;
};
import { Family } from "./PersonInfo/PersonInfo.js";
//in my class component in App.js I am using this JSX: <Family/>
What is wrong with using a lower case?