Jul 27, 2024
npm create vite@latest
react
when prompted for a framework.npm install
npm run dev
assets
for images/videos and .jsx
files for components.const Header = () => {
return <h1>My Website</h1>;
};
export default Header;
useState
hook to create stateful variables.
const [count, setCount] = useState(0);
useEffect
for side effects and to perform actions based on state changes.
useEffect(() => {
// Code to run on state change
}, [dependencies]);
ToDoList
component that manages tasks and a Task
sub-component that represents individual items.