Skip to content

Commit

Permalink
Update WIP README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MarjorieMaillee authored Jun 19, 2024
1 parent 3764ca2 commit a7cda4d
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

The objective of the library is to ease the discomfort of scrolling by implementing keyboard management for user input. While another solution offered plug-and-play functionality, we opted against it because it lacked the flexibility to address issues when they arise. We believe our approach will empower you to resolve any challenges your app may encounter.


| Authentication | Check Out |
| ------------- | ------------- |
| <video src="https://github.com/AppAndFlow/react-native-magic-scroll-demo/assets/129197567/c1e2b9f4-f66d-4aaf-a57d-9eb4b89400e9"> | <video src="https://github.com/AppAndFlow/react-native-magic-scroll-demo/assets/129197567/4d1a23f2-c55e-414f-a564-4883dfc2c3aa">|

## Installation

Expand All @@ -20,17 +22,31 @@ On Android, make sure to set `android:windowSoftInputMode` in your `AndroidManif

##### Expo

```json
```
// app.json
"android": {
...rest,
"softwareKeyboardLayoutMode": "pan"
}
```

## Dependencies

In order to make our library work to it's fullest, we recommend adding these two dependencies to your project.

### React Native Reanimated

Reanimated is crucial in your project to make our magic sccrolling work properly.
Learn more about this dependency [here](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started).

### Expo's SafeAreaContext

The SafeAreaProvider is really important for this library by helping it knowing the right dimensions of the device's safe area insets.
Learn more about this dependency [here](https://docs.expo.dev/versions/latest/sdk/safe-area-context/).

## Basic Usage

Wrap your form/screen within our ScrollView. Utilizing context requires it to be one level higher for enhanced control over your inputs. Alternatively, you can employ the Higher Order Component (HOC) for this purpose. For better results, we recommand using safeAreaProvider from React Native.
Wrap your form/screen within our ScrollView. Utilizing context requires it to be one level higher for enhanced control over your inputs. Alternatively, you can employ the Higher Order Component (HOC) for this purpose.

```tsx
import { MagicScroll } from '@appandflow/react-native-magic-scroll';
Expand Down Expand Up @@ -102,7 +118,7 @@ As mentioned in the introduction, the drawback of a plug-and-play library is its

We encourage you to wrap our TextInput with your custom one.

Here an example
Here's an example

```tsx
import { MagicScroll } from '@appandflow/react-native-magic-scroll';
Expand Down

0 comments on commit a7cda4d

Please sign in to comment.