react-native-feature-views
Enable/Disable views based on features in your react native app
This package allow to manage features reading it from a json file place on your project root directory. The file must be named as Features.json
at this file you need to define your features setting to false
or true
.
Getting Started
install using npm
npm install react-native-feature-view
Create features file in your project root directory name the file as Features.json
Example file content
{
"FeatureOne": true,
"FeatureListAdd": false,
"GoogleSocialAuth": true,
"AppleSocialAuthOnAndroid": false,
}
FeatureView Component
Use the FeatureView component provided in the package.
Example of how to use the component
import React from 'react';
import FeatureView from 'react-native-feature-view';
const App = () => {
return (
<SafeAreaView>
<FeatureView features={Features} name="FeatureOne">
<View>
<Text>Hello will show when FeatureOne is enable</Text>
</View>
</FeatureView>
</SafeAreaView>
);
};
and that is!
FOR THE NEXT VERSION OF PACKAGE
- Read file Features.json from project directory
- features providers HTTP, XML, etc.