@safercity/sdk-react-native 0.1.3 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +13 -8
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  React Native adapter for SaferCity SDK with expo-fetch streaming support and secure token storage.
4
4
 
5
+ ## What's New in v0.2.0
6
+
7
+ - **SDK Overhaul Alignment** - Updated to reflect v0.2.0 changes in core, client, and react packages.
8
+ - **User Scoping** - Full support for `userId` in `SaferCityProvider` and client options.
9
+ - **New Hooks** - Access to all new hooks from `@safercity/sdk-react` including Panic Information.
10
+
5
11
  ## What's New in v0.1.3
6
12
 
7
13
  - **Version update** - Updated to reflect v0.1.3 changes in core and react packages
@@ -170,20 +176,19 @@ const client = createReactNativeClient({
170
176
  All hooks from `@safercity/sdk-react` work seamlessly:
171
177
 
172
178
  ```tsx
173
- import { useUsers, useCreatePanic } from '@safercity/sdk-react';
179
+ import { useUser, useCreatePanic } from '@safercity/sdk-react';
174
180
 
175
- function UserList() {
176
- const { data, isLoading, error } = useUsers();
181
+ function Profile({ userId }: { userId: string }) {
182
+ const { data, isLoading, error } = useUser(userId);
177
183
 
178
184
  if (isLoading) return <ActivityIndicator />;
179
185
  if (error) return <Text>Error: {error.message}</Text>;
180
186
 
181
187
  return (
182
- <FlatList
183
- data={data?.data.users}
184
- renderItem={({ item }) => <UserItem user={item} />}
185
- keyExtractor={(item) => item.id}
186
- />
188
+ <View>
189
+ <Text>Name: {data?.data.firstName} {data?.data.lastName}</Text>
190
+ <Text>Status: {data?.data.status}</Text>
191
+ </View>
187
192
  );
188
193
  }
189
194
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@safercity/sdk-react-native",
3
- "version": "0.1.3",
3
+ "version": "0.2.0",
4
4
  "description": "React Native adapter for SaferCity SDK with expo-fetch streaming support",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -33,8 +33,8 @@
33
33
  "prepublishOnly": "bun run build"
34
34
  },
35
35
  "dependencies": {
36
- "@safercity/sdk": "0.1.3",
37
- "@safercity/sdk-core": "0.1.3"
36
+ "@safercity/sdk": "0.2.0",
37
+ "@safercity/sdk-core": "0.2.0"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "react": ">=18.0.0",