
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@matter/react-native
Advanced tools
This package contains the specific Platform implementations to allow running Matter Devices and Controllers on React-Native. It is designed to be used in addition to the other matter.js packages to enable React Native specific functionality.
[!Note] This package is still in development and should be considered experimental and not suited for production usage!
The main idea of this package is to provide a react-native implementation of the matter protocol and also proof the extensibility of the matter.js library. Currently a full commissioning process was not successfully tested. WHen you try to use it feel free to report where the process stops for you with which error message.
This package uses the following react-native libraries to provide the needed functionality:
npm run build: Build all code and create CommonJS and ES6 variants in dist directory. This will built incrementally and only build the changed files.npm run build-clean: Clean the dist directory and build all code from scratchNo tests available for now
To use `matter.js` with React Native, you need to modify your Metro configuration to ensure that the packages are resolved correctly. You need to add a special resolver entry and merge it with your existing Metro configuration. Below is an example of how to do this:
/* eslint-env node */
// Used to merge configs together.
const { mergeConfig } = require('@react-native/metro-config');
// Your project configuration.
const { getYourConfig } = require('your-config-provider');
// Get your config.
const yourConfig = getYourConfig();
// New resolver configuration to fix the package resolution issue.
const customConfig = { resolver: { unstable_enablePackageExports: true } };
// Merging your existing configuration with the new resolver configuration.
module.exports = mergeConfig(yourConfig, customConfig);
In this example, `customConfig` includes the necessary resolver configuration, and `mergeConfig` is used to combine it with your existing configuration (`yourConfig` in this case). Adjust `yourConfig` to fit your existing Metro configuration setup.
FAQs
Experimental React Native support for matter.js
The npm package @matter/react-native receives a total of 602 weekly downloads. As such, @matter/react-native popularity was classified as not popular.
We found that @matter/react-native demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.