https://github.com/ildfreelancer/rn-size-matters
https://github.com/ildfreelancer/rn-size-matters
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ildfreelancer/rn-size-matters
- Owner: ildfreelancer
- Created: 2023-05-24T07:30:13.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-05-22T04:39:02.000Z (about 1 year ago)
- Last Synced: 2025-09-12T13:57:25.150Z (10 months ago)
- Language: TypeScript
- Size: 92.8 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Note for developers
All credits to
1/ To install:
```bash
yarn add @gocodingnow/rn-size-matters
```
or
```bash
npm i @gocodingnow/rn-size-matters
```
or
```bash
pnpm i @gocodingnow/rn-size-matters
```
2/ Configuration
In App.tsx, set default resolution at the root,
```jsx
const SIZE_MATTERS_BASE_WIDTH = 375;
const SIZE_MATTERS_BASE_HEIGHT= 812;
setSizeMattersBaseWidth(SIZE_MATTERS_BASE_WIDTH);
setSizeMattersBaseHeight(SIZE_MATTERS_BASE_HEIGHT);
```