Versions v1.14.0 or below to v1.16.0
This guide provides an overview of the key changes in v1.16.0 of the LikeMinds Feed React Native SDK and instructions for updating your project from v1.14.0 or below.
Key Updates in v1.16.0
Added support for Target SDK 35 for Android and React Native 0.79.1, includes changes in how keyboardAvoidingView is being managed keeping edge to edge support in mind
Added support for alternate library for handling documents(PDFs) which supports React Native 0.79.1 and the new architecture
Migration Steps
Step 1: Upgrade the LikeMinds Feed packages in package.json to the below versions
"@likeminds.community/feed-rn": "1.6.0",
"@likeminds.community/feed-rn-core": "1.16.0"
Step 2: Replace dependencies handling documents
Uninstall the previous dependencies
npm uninstall react-native-document-picker react-native-file-viewer
Install the new dependencies
npm install @react-native-documents/picker @react-native-documents/viewer
Step 3: Wrap the SDK with <SafeAreaProvider> and <SafeAreaView>
Avoid this step if your project is already wrapped with the above components
import {
SafeAreaProvider,
SafeAreaView
} from "react-native-safe-area-context";
// Incase of issues in KeyboardAvoiding behaviour, apply the below styling
STYLES.setKeyboardAvoidingViewOffset({
applyKeyboardAvoidingViewOffset: true,
})
<SafeAreaProvider>
<SafeAreaView style={{flex: 1}}>
<GestureHandlerRootView style={{ flex: 1 }}>
<LMOverlayProvider
myClient={myClient}
apiKey={apiKey}
userName={userName}
userUniqueId={uuid}
isUserOnboardingRequired={onboardUser}
>
<Stack.Navigator screenOptions={{ headerShown: false }}>
{/* LikeMinds Stack Screens */}
</Stack.Navigator>
</LMOverlayProvider>
</GestureHandlerRootView>
</SafeAreaView>
</SafeAreaProvider>
By following these steps, you can migrate seamlessly to v1.16.0 and take advantage newly introduced features and customizations.