Upgrading to Knit UI 1.1 (Expo SDK 58)
Knit UI 1.1 is the kit on Expo SDK 58. The component API and the styling
language from 1.0 are unchanged, but the kit's peer dependencies now require SDK 58,
so an app on SDK 57 has to upgrade Expo with it. One API changed as well:
Carousel's gestureConfig (see below).
The short version
- Upgrade your app to Expo SDK 58 (
npx expo install expo@^58and thennpx expo install --fix). - Bump every
@knitui/*package together:core,hooks,mediaquery,components,icons,emoji,graphics,dates,media,carouselandsheetgo to 1.1,mapto 0.6 andpluginsto 1.0.1. - On iOS, apply the build patches below (or build React Native from source).
- If you pass
gestureConfigto aCarousel, switch it to the config object.
What you need to change
Expo SDK 58 is required
| Dependency | Version |
|---|---|
react-native | 0.88 |
react | 19.3 |
react-native-reanimated | 4.7 |
react-native-worklets | 0.13 |
react-native-gesture-handler | 3.3 |
@shopify/react-native-skia | 2.14 |
react-native-svg | 15.16 |
expo-image | ~58.0 |
expo-audio / expo-video | ~58.0 |
Carousel gestureConfig is a config object
Every kit gesture now uses the Gesture Handler 3 hook API, so the carousel can no
longer hand you a Gesture.Pan() builder to modify.
// before (1.0)
<Carousel gestureConfig={(g) => g.activeOffsetX([-10, 10]).simultaneousWithExternalGesture(other)} />
// after (1.1)
<Carousel gestureConfig={{ activeOffsetX: [-10, 10], simultaneousWith: other }} />The object is typed as CarouselGestureConfig.
Native ref types
React Native 0.88's generated types are stricter: component values are no longer
instance types. The kit's native refs now use ScrollViewInstance and
ViewInstance (for example EffectView's ref and KeyboardAwareScrollView's
forwarded ref). Type your own refs the same way if tsc complains.
iOS build patches
React Native 0.88 builds React from a precompiled framework by default. Two
dependencies and React Native itself need a small patch until their fixes ship.
Apply them with a pnpm or patch-package patch, or set
ios.buildReactNativeFromSource to true instead.
react-native-teleport@1.2.2(used byPortal) and@maplibre/maplibre-react-native@11.5.0don't compile: they import"RCTFabricComponentsPlugins.h". Change it to<React/RCTFabricComponentsPlugins.h>.react-native@0.88.0lists its sampleSampleTurboModuleas a module to set up at startup, but the precompiled framework doesn't include it, so every debug launch shows an "Unable to find module for SampleTurboModule" red box. Remove that entry fromcodegenConfig.libraries[0].ios.modulesinreact-native/package.json, then runpod install.
Recommended: overlays in a navigation stack
New in this release and optional: pass your navigator's focus state to
<Provider useScreenFocus>. A stack navigator keeps the screen you left mounted,
and without this an open popover there draws over the screen in front. See
Overlays in a navigation stack
for the Expo Router hook.
Fixed in 1.1
Audio,Video,AudioPlaylistandAudioRecorderno longer crash on React Native 0.88.AudioMeshno longer crashes native apps on Skia 2.14.@knitui/mediano longer crashes web apps without theexpoentry (such as Next) on SDK 58.react-native-svgworks on the web again through@knitui/plugins/next-plugin.- No more "Dependencies should only be used on the web" warnings from kit components.
variant="gradient"without agradientprop paints the theme gradient, as documented.