Tarjima qoshish uchun havola boyicha o'tib Pull Request oching (havolaga o'tish).
Standart til uchun tarkibni ko'rsatadi.
Gate is a hook for conditional rendering, based on current value (or values) in props. An example of a problem that Gate can solve – you can put together all required data when component was mounted, or show another component if there is not enough data in props. Gate also looks good for Routing or animation.
This allows you to send props back to Store to create a feedback loop.
Gate can be used via the useGate hook or as a component with props (<Gate history={history} />
).
Gate stores and events can be used in the application as regular units.
Gate can have two states:
- Open, which means mounted
- Closed, which means unmounted
Properties
.state
Store
Do not modify the state
value! It is a derived store and should be kept in a predictable state.
Store<Props>
: Derived Store with the current state of the given gate. The state comes from the second argument of useGate and from props when rendering the gate as a component.
.open
Event
Do not manually call this event. It is an event that depends on a Gate’s state.
Event
.close
Event
Do not manually call this event. It is an event that depends on a Gate’s state.
Event
.status
Store
Do not modify the status
value! It is a derived store and should be in a predictable state.
Store<boolean>
: Boolean Derived Store, which shows if the given gate is mounted.
Ingliz tilidagi hujjatlar eng dolzarb hisoblanadi, chunki u effector guruhi tomonidan yozilgan va yangilanadi. Hujjatlarni boshqa tillarga tarjima qilish jamiyat tomonidan kuch va istaklar mavjud bo'lganda amalga oshiriladi.
Esda tutingki, tarjima qilingan maqolalar yangilanmasligi mumkin, shuning uchun eng aniq va dolzarb ma'lumot uchun hujjatlarning asl inglizcha versiyasidan foydalanishni tavsiya etamiz.