Skip to content

Commit 31e757e

Browse files
committed
fix code snippet
1 parent ea8cff5 commit 31e757e

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

website/blog/2026-04-07-react-native-0.85.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,10 @@ With the new animation backend, you'll be able to animate Flexbox and position p
6767
```jsx
6868
import {
6969
Animated,
70-
View,
7170
Button,
71+
View,
7272
useAnimatedValue,
7373
} from 'react-native';
74-
import {allowStyleProp} from 'react-native/Libraries/Animated/NativeAnimatedAllowlist';
75-
76-
allowStyleProp('width');
7774

7875
function MyComponent() {
7976
const width = useAnimatedValue(100);
@@ -87,12 +84,12 @@ function MyComponent() {
8784
};
8885

8986
return (
90-
<>
87+
<View style={{flex: 1}}>
9188
<Animated.View
9289
style={{width, height: 100, backgroundColor: 'blue'}}
9390
/>
9491
<Button title="Expand" onPress={toggle} />
95-
</>
92+
</View>
9693
);
9794
}
9895
```

0 commit comments

Comments
 (0)