正在加载视频...

视频加载失败

Here is a patch to test CSS grid in React native.

68,544 次观看 • 10 个月前 •via X (Twitter)

18 条评论

Kacper Kapuściak 的头像
Kacper Kapuściak10 个月前

I wanted grid in RN for so long that I lost hope years ago accepted the fate that it’s just not possible but you did it you gave us hope again

nishan (o^▽^o) 的头像
nishan (o^▽^o)10 个月前

Thanks Kacper. Big thanks to Expo ♥️, i had enough time to work on it properly.

AGK (Ejike) 的头像
AGK (Ejike)10 个月前

will these work on tailwind classes now?

nishan (o^▽^o) 的头像
nishan (o^▽^o)10 个月前

Yup!

AGK (Ejike) 的头像
AGK (Ejike)10 个月前

Great, please media queries next 🥲🤝. Thank you in advance

ehsan 的头像
ehsan10 个月前

LFG

Michał Pierzchała 的头像
Michał Pierzchała10 个月前

LFG!

Hirvesh 的头像
Hirvesh10 个月前

So so amazing! Thanks Nishan! 👌

Ashuuu🧚‍♀️ 的头像
Ashuuu🧚‍♀️10 个月前

👍🏻

Neha Sharma 的头像
Neha Sharma10 个月前

Looks amazing 🤩

niya 的头像
niya10 个月前

great job Nishan! Thank you!

nishan (o^▽^o) 的头像
nishan (o^▽^o)10 个月前

🙏

alexeevayaan 的头像
alexeevayaan10 个月前

😍😍

Giorgio Bertolotti 的头像
Giorgio Bertolotti10 个月前

hell yeah, finally, great job! 😍

Flingex 的头像
Flingex10 个月前

What kind of use cases could grid bring into react native?

nishan (o^▽^o) 的头像
nishan (o^▽^o)10 个月前

e.g. consider this simple card layout. With flexbox you can think of it as: <Column> <Row spaceBetween><Icon /><Logo /></Row> <CardNumber /> <Row spaceBetween><Name /><Expiry /></Row> </Column> requires 8 views. With grid, you can declare the layout upfront with grid column/row properties and have a single parent with 5 children. It will require 6 views. <Container> <Icon /> <Logo /> <CardNumber /> <Name /> <Expiry /> </Container> It requires fewer wrapper views when building 2 dimensional layouts, it is like flex wrap with more controls. It is a complementary system to flexbox, but no need to use it everywhere! It becomes much more intuitive for desktop layout. e.g. In X's layout i'd use grid for the main layout, the hierarchy will be more flat and easy to move things around. There could be more usecases like this one -

Flingex 的头像
Flingex10 个月前

Thank you so much actually makes sense now

Damiano Collu 的头像
Damiano Collu7 个月前

Hey @nishanbende is this something that will be included into the main React Native repo?

相关视频