Matrix client SDK for React Native
This SDK wraps the FFI bindings of matrix-rust-sdk for use in React Native via matrix-rust-components-kotlin and matrix-rust-components-swift.
Since this is a fairly young project we're not making releases yet. To use the module, clone the repository into a sibling folder of your app and then install it with e.g.
npm add ../react-native-matrix-sdk
Additionally you need to change metro.config.js
to find and watch the module's source
code.
const config = {
resolver: {
extraNodeModules: {
'react-native-matrix-sdk': path.resolve(__dirname, '../react-native-matrix-sdk'),
}, ...
},
watchFolders: [
path.resolve(__dirname, '../react-native-matrix-sdk'), ...
]
};
See [src/index.tsx] for the module's full API. You may also find a usage example in [example/src/App.tsx].
Objects that have a destroy
method live on the native side and need to be explicitly
deallocated by calling obj.destroy()
to prevent memory leaks.
See the contributing guide to learn about the development and contribution workflow.
Apache-2.0