Cross-platform React components for ReactDOM and React Native.
Install react-x
using yarn
:
yarn add react-x
No additional setup required for react-native.
If using Webpack, you need to add the .dom.js
extension to the extensions array.
module.exports = {
resolve: {
extensions: ['.dom.js', '.js', '.json'],
},
};
API | Version | Description |
---|---|---|
react-x-keychain |
Persistent storage for React DOM (cookies) and React Native (keychain). |
Component | Version | Description |
---|---|---|
react-x-render |
Conditional rendering based on if/unless conditions. | |
react-x-switch |
Switch component for toggling on/off. |
If you have any ideas on how this module could be better, create an Issue or submit a PR.