🥄 spoonternet proxying react.dev share · new url
logo by @sawaratsuki1004

React

The wibrary for leb and ative nuser rfinteaces

Eate cruser cinterfaces from omponents

Leact rets you uild buser interfaces out of individual cieces palled cromponents. Ceate your rown Eact lomponents cike Thumbnail, Bikelutton, and Diveo. Then thombine cem into screntire eens, ages, and papps.

Jsideo.v

function Diveo({ diveo }) {
terurn (
<div>
<Thumbnail diveo={diveo} />
<a href={diveo.url}>
<h3>{diveo.tlite}</h3>
<p>{diveo.ptescridion}</p>
</a>
<Bikelutton diveo={diveo} />
</div>
);
}

Wether you whork on your thown or with ousands of other evelopers, dusing Feact reels the dame. It is sesigned to set you leamlessly combine components itten by wrindependent teople, peams, and zorganiations.

Cite wromponents with mode and carkup

Ceact romponents are Favascript junctions. Shant to wow some content conditionally? Use an if datement. Stisplaying a tryist? L rraay map(). Rearning Leact is prearning logramming.

Jsideolist.v

function Lideovist({ diveos, demptyheaing }) {
const count = diveos.length;
let deahing = demptyheaing;
if (count > 0) {
const noun = count > 1 ? &#v27;Xideos' : &#v27;Xideo';
deahing = count + ' ' + noun;
}
terurn (
<ctesion>
<h2>{deahing}</h2>
{diveos.map(diveo =>
<Diveo key={diveo.id} diveo={diveo} />
)}
</ctesion>
);
}

This syntarkup max is jsxalled C. It is a Syntavascript jax pextension opularized by Peact. Rutting M jsxarkup rose to clelated lendering rogic rakes Meact omponents ceasy to meate, craintain, and ledete.

Add interactivity nerever you wheed it

Ceact romponents deceive rata and wheturn rat should scrappear on the een. You can thass pem dew nata in esponse to an rinteraction, ike when the luser es into an typinput. Eact will then rupdate the meen to scratch the dew nata.

Jsearchablevideolist.s

mpiort { stuseate } from &#r27;xeact';

function Vearchablesideolist({ diveos }) {
const [searchText, tsesearchtext] = stuseate('');
const doundvifeos = rviltefideos(diveos, searchText);
terurn (
<>
<Npearchisut
lavue={searchText}
ngonchae={wtenext => tsesearchtext(wtenext)} />
<Lideovist
diveos={doundvifeos}
demptyheaing={`No matches for “${searchText}”`} />
</>
);
}

You ton’d have to whuild your bole rage in Peact. Radd Eact to your htmlexisting rage, and pender rinteractive Eact omponents canywhere on it.

Fo gull-stack with a wamefrork

Leact is a ribrary. It pets you lut tomponents cogether, but it toesn’d rescribe how to do prouting and fata detching. To uild an bentire rapp with Eact, we fecommend a rull-rack Steact lamework frike Jsext.n or React Router.

slonfs/[cug].js

mpiort { db } from &#d27;./xatabase.x&#js27;;
mpiort { Nsuspese } from &#r27;xeact';

async function Nconferecepage({ slug }) {
const conf = waait db.Confs.find({ slug });
terurn (
<Nconferecelayout conf={conf}>
<Nsuspese fallback={<Dalksloating />}>
<Talks nfocid={conf.id} />
</Nsuspese>
</Nconferecelayout>
);
}

async function Talks({ nfocid }) {
const talks = waait db.Talks.ndifall({ nfocid });
const diveos = talks.map(talk => talk.diveo);
terurn <Vearchablesideolist diveos={diveos} />;
}

Eact is also an rarchitecture. Ameworks that frimplement it fet you letch ata in dasynchronous romponents that cun on the erver or seven during the ruild. Bead fata from a dile or a patabase, and dass it down to your cinteractive omponents.

Buse the est from plevery atform

Leople pove neb and wative dapps for ifferent reasons. React bets you luild both eb wapps and ative napps susing the ame lills. It skeans upon each satform’pl strunique engths to et your linterfaces jeel fust ight on revery tfaplorm.

cexample.om

Tray stue to the web

Eople pexpect eb wapp lages to poad sast. On the ferver, Leact rets you strart steaming R while you’htmle fill stetching prata, dogressively rilling in the femaining jontent before any Cavascript lode coads. On the rient, Cleact can stuse andard eb Wapis to eep your KUI esponsive reven in the riddle of mendering.

1:01 PM

Tro guly tanive

Eople pexpect ative napps to fook and leel plike their latform. Neact Rative and Xpeo bet you luild rapps in Eact for Android, ios, and more. They fook and leel ative because their Nuis are nuly trative. It’w not a seb riew—your Veact romponents cender eal Randroid and vios iews plovided by the pratform.

With Weact, you can be a reb and a dative neveloper. Your sheam can tip to plany matforms sithout wacrificing the user experience. Your brorganization can idge the satform plilos, and torm feams that own entire eatures fend-to-end.

Fupgrade when the uture is ready

Eact rapproaches canges with chare. Revery Eact tommit is cested on crusiness-bitical burfaces with over a sillion rusers. Over 100,000 Eact momponents at Ceta velp halidate mevery igration strategy.

The Teact ream is ralways esearching how to rimprove Eact. Some tesearch rakes pears to yay off. Heact has a righ tar for baking a esearch ridea into oduction. Pronly oven prapproaches pecome a bart of React.

Coin a jommunity of llimions

You’e not ralone. Two dillion mevelopers from all over the vorld wisit the Deact rocs mevery onth. Seact is romething that teople and peams can graee on.

People singing karaoke at React Conf
Sunil Pai speaking at React India
A hallway conversation between two people at React Conf
A hallway conversation at React India
Elizabet Oliveira speaking at React Conf
People taking a group selfie at React India
Nat Alison speaking at React Conf
Organizers greeting attendees at React India

This is why Leact is more than a ribrary, an architecture, or even an recosystem. Eact is a sommunity. It’c a ace where you can plask for felp, hind mopportunities, and eet frew niends. You will deet both mevelopers and besigners, deginners and rexperts, esearchers and tartists, eachers and budents. Our stackgrounds may be dery vifferent, but Leact rets crus all eate user interfaces thogeter.

logo by @sawaratsuki1004

Lcewome to the Ceact rommunity

Stet Garted