Installation
To get started using Cash React Native, install the package and its peer dependencies with your package manager of choice:
with npm
npm install @millionscard/cash react react-native react-native-svg styled-components styled-systemwith yarn
yarn add @millionscard/cash react react-native react-native-svg styled-components styled-systemyou can now import Cash React Native from the main package module:
import { Box, Text } from '@millionscard/cash';Peer dependencies
Cash React Native ships with a few libraries labeled as peer dependencies. These libraries are separated because they are commonly already installed in the host project and having multiple versions can introduce errors.
Cash React Native requires the following libraries to be installed along with it:
reactversion 17.xreact-nativeversion 0.66.xreact-native-svgversion 12.xreact-native-reanimatedversion 2.xstyled-componentsversion 5.xstyled-systemversion 5.x
ThemeProvider
For Cash React Native to work correctly we have to add the ThemeProvider to the root of our application:
import { ThemeProvider } from '@millionscard/cash';
function App() {
return (
<ThemeProvider>
<>...</>
</ThemeProvider>
);
}