YouTip LogoYouTip

React Tutorial - Getting Started

What is React?

React is a JavaScript library for building user interfaces by Meta.

Components

function Welcome({ name }) {
    return <h1>Hello, {name}!</h1>;
}

function App() {
    return (
        <div>
            <Welcome name="Alice" />
            <Welcome name="Bob" />
        </div>
    );
}

Summary

  • React uses components to build UI
  • JSX combines JavaScript and HTML-like syntax
← React Hooks - useState and useSQLite Tutorial - Getting Star β†’