Sendbird Documentation on React Native UI Kit non-functional (solution) (Locale must include property localize)

[Problem/Question]
// Detailed description of issue.
On the most recent versions of React Native (0.73.3) and iOS (17.2.1)
the base UIKit integrations for React Native do not function out of the box
because once a message is sent, a ‘localize’ object must be present in the locale
object


// If problem, please fill out the below. If question, please delete.
[UIKit Version]
// What version of the SDK are you using?
4.10.8

[Reproduction Steps]
// Please provide reproduction steps and, if possible, code snippets.
generate new React Native project and implement the ‘Send Your First Message’ docs
on the site

[Frequency]
// How frequently is this issue occurring?
every new project

[Current impact]
// How is this currently impacting your implementation?
I have a solution, so it is currently not, but it took over an hour of debugging the
native files to get to this solution so hopefully this helps someone else

SOLUTION:

import { StringSetEn,


} from ‘@sendbird/uikit-react-native’

<SendbirdUIKitContainer
**** SET THIS PROPERTY ON UIKitContainer: localization={{ stringSet: StringSetEn }} ******
appId={‘472AF464-B527-414B-8462-F1829A82C222’}
chatOptions={{
localCacheStorage: AsyncStorage,
onInitialized: SetSendbirdSDK,
enableAutoPushTokenRegistration: true,
}}

/>

1 Like

I did it but another crash has happened.
I think there are some serious issues in react native skd

1 Like

+1, same issue. I did it but another crash has happened. Needs to be addressed, doing this is inconsistent with documentation

I got this to work by uninstalling date-fns then
npm install date-fns@2.28.0

then in my App.tsx

import { format } from ‘date-fns’;
import { enUS } from ‘date-fns/locale’;

then inside the function but before the return statement add
const date = new Date();
const formattedDate = format(date, ‘dd MMM yyyy’, { locale: enUS });

Did any one found the solution for this issue? I am also getting this error while reloading the sent messages. I had tried adding the sample react native code and getting this issue in GroupChannelPreviewContainer module. @Knekte @isom.tech