Skip to content

Commit fdd2feb

Browse files
committed
chore: polished the example expo app
1 parent 9ab75ee commit fdd2feb

5 files changed

Lines changed: 64 additions & 39 deletions

File tree

example/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import {
44
KeyboardAvoidingView,
55
Platform,
66
Pressable,
7-
SafeAreaView,
87
Text,
98
TextInput,
109
View,
1110
type ListRenderItemInfo,
1211
type PressableStateCallbackType,
1312
} from 'react-native';
13+
import { SafeAreaView } from 'react-native-safe-area-context';
1414
import { StatusBar } from 'expo-status-bar';
1515
import {
1616
align,

example/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Example
2+
3+
## About this app
4+
5+
Expo app that demos **nativeflowcss** with a todo-style UI.
6+
7+
## Screenshots
8+
9+
<table>
10+
<tr>
11+
<td align="center">
12+
<img src="https://ik.imagekit.io/jayowiee/github/nativeflow/example/ss-1.png" width="250"/><br/>
13+
<p>Main screen</p>
14+
</td>
15+
<td align="center">
16+
<img src="https://ik.imagekit.io/jayowiee/github/nativeflow/example/ss-2.png" width="250"/><br/>
17+
<p>Todo list</p>
18+
</td>
19+
</tr>
20+
</table>
21+
22+
## Run locally
23+
24+
```bash
25+
npm install
26+
npm start
27+
```
28+
29+
Use Expo Go, or `npm run ios`, `npm run android`, or `npm run web`.
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
import { registerRootComponent } from 'expo';
2+
import { SafeAreaProvider } from 'react-native-safe-area-context';
23

34
import App from './App';
45

6+
function Root() {
7+
return (
8+
<SafeAreaProvider>
9+
<App />
10+
</SafeAreaProvider>
11+
);
12+
}
13+
514
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
615
// It also ensures that whether you load the app in Expo Go or in a native build,
716
// the environment is set up appropriately
8-
registerRootComponent(App);
17+
registerRootComponent(Root);

example/package-lock.json

Lines changed: 21 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "example",
33
"version": "1.0.0",
4-
"main": "index.ts",
4+
"main": "index.tsx",
55
"scripts": {
66
"start": "expo start",
77
"android": "expo start --android",
@@ -13,7 +13,8 @@
1313
"expo-status-bar": "~3.0.9",
1414
"nativeflowcss": "^1.4.1",
1515
"react": "19.1.0",
16-
"react-native": "0.81.5"
16+
"react-native": "0.81.5",
17+
"react-native-safe-area-context": "~5.6.0"
1718
},
1819
"devDependencies": {
1920
"@types/react": "~19.1.0",

0 commit comments

Comments
 (0)