Sep 21, 2024
node -v
command.npm create vite@latest
npm install
npm run dev
node_modules
: Contains all third-party libraries.public
: Contains public assets (images, videos).src
: Contains the source code (React components).index.html
: Basic template with div
for app container.package.json
: Information about the project and dependencies.const Message = () => {
return <h1>Hello World</h1>;
};
{}
to embed JavaScript expressions in JSX.onClick
.<button onClick={() => console.log('Clicked!')}>Click Me</button>
children
prop.const Alert = ({ children }) => <div>{children}</div>;