stacks icon indicating copy to clipboard operation
stacks copied to clipboard

Stacks v4.0.0 (with Unistyles v3)

Open mobily opened this issue 11 months ago • 10 comments

This PR brings a major update to Stacks. It's using Unistyles v3 now, and you'll need at least React Native v0.76.0 to get started. Since Unistyles v3 is still in beta, this new version of Stacks is also in beta for the time being. Once Unistyles gets to a stable version, I'll release a stable version of Stacks too.

To grab the beta version of Stacks, just run the following command:

npm install @grapp/stacks@beta
yarn add @grapp/stacks@beta
pnpm add @grapp/stacks@beta
bun add @grapp/stacks@beta

What's New

Box

New props have been added:

  • outlineColor
  • outlineStyle
  • outlineWidth
  • outlineOffset
  • pointerEvents
  • opacity
  • overflow

The outline* props are available only if you use RN v0.77.0 at least.

Columns / Column

I've cleaned things up by removing a bunch of props from both components. Here's what's gone:

  • backgroundColor
  • borderRadius
  • borderTopLeftRadius
  • borderTopRightRadius
  • borderBottomLeftRadius
  • borderBottomRightRadius
  • borderWidth
  • borderTopWidth
  • borderRightWidth
  • borderBottomWidth
  • borderLeftWidth
  • borderColor

Also, the following new props are not included:

  • outlineColor
  • outlineStyle
  • outlineWidth
  • outlineOffset

So instead of using your components like this:

<Columns space={2} backgroundColor="red">
  <Column flex="1/2" borderWidth={1} borderColor="yellow">…</Column>
  <Column flex="1/2">…</Column>
</Columns>

You should switch to this format:

<Box backgroundColor="red">
  <Columns space={2}>
    <Column flex="1/2">
      <Box borderWidth={1} borderColor="yellow">
        …
      </Box>
    </Column>
    <Column flex="1/2">…</Column>
  </Columns>
</Box>

I'm super excited about this release, a new version of Unistyles looks fantastic! If you run into any bugs or have ideas on how we can make things better, I'd love to hear from you.

mobily avatar Feb 08 '25 13:02 mobily

Guyyssss, please I can't wait for this to get released!

Code-Victor avatar May 20 '25 14:05 Code-Victor

@Code-Victor you can already use it by installing the beta, as stated in the post, npm install @grapp/stacks@beta

marcel-happyfloat avatar May 23 '25 08:05 marcel-happyfloat

https://github.com/jpudysz/react-native-unistyles/releases/tag/v3.0.0 let's go..!

ananjaemin avatar Jul 07 '25 12:07 ananjaemin

😭

ananjaemin avatar Jul 25 '25 11:07 ananjaemin

Hello, thanks for the awesome library! Is there a roadmap to plan the migration to support the new unistyles?

kitolog avatar Jul 29 '25 15:07 kitolog

@mobily LTGM?

erickreutz avatar Aug 21 '25 13:08 erickreutz

🚀 Excited to see this update! Been waiting for the new Unistyles support — really looking forward to trying it out. Curious though, why such a long wait for this release? Thanks for pushing it forward 🙌

maksim-romanov avatar Sep 05 '25 17:09 maksim-romanov

any update?

jieey1140 avatar Oct 09 '25 11:10 jieey1140

bye bye migration complete

ananjaemin avatar Oct 31 '25 09:10 ananjaemin

@mobily do you have any plans to push this to the finish line? Working on updating to unistyles 3 and this is the only blocker.

erickreutz avatar Dec 01 '25 14:12 erickreutz