Khariidadda Horumariyaha Frontend
Tallaabo 10 / 18180 daqiiqo

React

Nidaamka React

Sharaxaad

React wuxuu kuu oggolaanayaa inaad UIs ka dhisto components dib loo isticmaali karo oo leh props, state, iyo hooks.

Tusaale code

tsx
import { useState } from "react";

type Props = { title: string };

export function Counter({ title }: Props) {
  const [count, setCount] = useState(0);

  return (
    <section>
      <h2>{title}</h2>
      <p>{count}</p>
      <button onClick={() => setCount((value) => value + 1)}>
        Increment
      </button>
    </section>
  );
}

Agab waxtar leh

Layli

Abuuri React app oo leh Card component dib loo isticmaali karo iyo liis resources ah oo la filter-gareyn karo.