Intro
The core package react-native-ama
enriches React Native by adding custom hooks and extending its components to prioritize accessibility.
The core components in the package are designed to focus solely on accessibility checks without adding additional styling.
Installation
Install the react-native-ama
package with your favourite package manager:
- npm
- Yarn
- pnpm
npm install -D react-native-ama
yarn add --dev react-native-ama
pnpm add -D react-native-ama
Config File
If you install the react-native-ama
package, the ama.rules.json file should be generated automatically. In case it doesn't generate automatically:
echo "{}" >> ama.rules.json
cd node_modules/react-native-ama
ln -s ../../ama.rules.json .
For more detailed information about the config file, please refer to this documentation.
Usage
You must include the AMAProvider in your app, as some components and hooks require it.
import { AMAProvider } from 'react-native-ama';
const App = () => {
return (
<AMAProvider>
<YourApp />
</AMAProvider>
);
};