DevCycle React Native
The DevCycle React Native SDK lets you easily integrate your React Native web applications with DevCycle.
DevCycle supports React Native Expo. See the React Native Expo SDK installation for more information.
Extra steps are required to get DevCycle working with React Native Web. See the React Native Web section below for more information.
Installation
Installing the SDK
Expo Installation
Installing the Expo SDK
Getting Started
Initializing the SDK
Usage
Using the SDK
The React Native SDK is available as a package on npm. A separate React Native Expo SDK is available as a package on npm. Both SDKs are also open source and can be viewed on Github.
Requirements
This SDK is compatible with React Native version 0.64.0 and above.
If you are using Flipper with React Native versions below 0.75.0
, SSE connections (which power real-time updates) will not work on Android unless Flipper is disabled. See this issue for more information.
React Native Web
To get your React Native Web working with DevCycle, you will need to change one of the rules in the webpack config to include .cjs
files as one of the file types to be transpiled, e.g.:
const createExpoWebpackConfigAsync = require('@expo/webpack-config')
module.exports = async function (env, argv) {
const config = await createExpoWebpackConfigAsync(env, argv)
config.module.rules = config.module.rules.map((rule) => {
if (rule.oneOf instanceof Array) {
// add "cjs" as an exclusion to this rule to prevent it from being regarded as an asset
rule.oneOf[rule.oneOf.length - 1].exclude = [
/\.(js|mjs|jsx|cjs|ts|tsx)$/,
/\.html$/,
/\.json$/,
]
}
return rule
})
return config
}
For more information, see this Github issue.