Telegram Group & Telegram Channel
React 19 Beta

Eng katta yangiliklar:

1. Server actions
2. use huki

Shaxsan menga eng yoqqan o'zgarishlar:

1. Funksiyaviy komponentlar uchun endi forwardRef shart emas. Shunchaki props.ref qilib ishlatsa bo'ladi.

function Comp({ ref }) {
return <input ref={ref} />
}


2. <Context /> o'zini endi Provider qilib ishlash mumkin. Ya'ni <Context.Provider /> qilib o'tirmasadan. 💚

const Context = createContext('');

function App({children}) {
return (
<Context>
{children}
</Context>
);
}



3. Meta teglarni endi bemalol ishlatsa bo'ladi. Xatto CSS fayllarni qo'shish mumkin: 😍

function Page() {
return (
<div>
<title>Sarlavha</title>
<link
rel="stylesheet"
href="/page.css"
precedence="default"
/>
<meta name="author" content="Diyor" />
</div>
)
}


4. useFormStatus
Endi <form> huddi Context kabi ishlaydi va uning ichida joylashgan komponentlar useFormStatus orqali formaning holatini o'qishlari mumkin (pending, submitted, ...).
Oldin bu ish uchun alohida Context yoki proplar zanjiri kerak bo'lardi.

Batafsil: https://react.dev/blog/2024/04/25/react-19#improvements-in-react-19
🔥14👍8



tg-me.com/brogrammist/180
Create:
Last Update:

React 19 Beta

Eng katta yangiliklar:

1. Server actions
2. use huki

Shaxsan menga eng yoqqan o'zgarishlar:

1. Funksiyaviy komponentlar uchun endi forwardRef shart emas. Shunchaki props.ref qilib ishlatsa bo'ladi.


function Comp({ ref }) {
return <input ref={ref} />
}


2. <Context /> o'zini endi Provider qilib ishlash mumkin. Ya'ni <Context.Provider /> qilib o'tirmasadan. 💚

const Context = createContext('');

function App({children}) {
return (
<Context>
{children}
</Context>
);
}



3. Meta teglarni endi bemalol ishlatsa bo'ladi. Xatto CSS fayllarni qo'shish mumkin: 😍

function Page() {
return (
<div>
<title>Sarlavha</title>
<link
rel="stylesheet"
href="/page.css"
precedence="default"
/>
<meta name="author" content="Diyor" />
</div>
)
}


4. useFormStatus
Endi <form> huddi Context kabi ishlaydi va uning ichida joylashgan komponentlar useFormStatus orqali formaning holatini o'qishlari mumkin (pending, submitted, ...).
Oldin bu ish uchun alohida Context yoki proplar zanjiri kerak bo'lardi.

Batafsil: https://react.dev/blog/2024/04/25/react-19#improvements-in-react-19

BY Brogrammist




Share with your friend now:
tg-me.com/brogrammist/180

View MORE
Open in Telegram


Brogrammist Telegram | DID YOU KNOW?

Date: |

How Does Bitcoin Mining Work?

Bitcoin mining is the process of adding new transactions to the Bitcoin blockchain. It’s a tough job. People who choose to mine Bitcoin use a process called proof of work, deploying computers in a race to solve mathematical puzzles that verify transactions.To entice miners to keep racing to solve the puzzles and support the overall system, the Bitcoin code rewards miners with new Bitcoins. “This is how new coins are created” and new transactions are added to the blockchain, says Okoro.

A project of our size needs at least a few hundred million dollars per year to keep going,” Mr. Durov wrote in his public channel on Telegram late last year. “While doing that, we will remain independent and stay true to our values, redefining how a tech company should operate.

Brogrammist from jp


Telegram Brogrammist
FROM USA