Skip to content

Commit fa41f98

Browse files
committed
fix(react-sdk): use client getters to preserve client auth state
1 parent 93bc653 commit fa41f98

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

sdks/urbackend-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@urbackend/react",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "React SDK for urBackend",
55
"publishConfig": {
66
"access": "public"

sdks/urbackend-react/src/context.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ export const UrProvider: React.FC<UrProviderProps> = ({ apiKey, baseUrl, childre
3434
const _client = new UrBackendClient({ apiKey, baseUrl });
3535
return {
3636
client: _client,
37-
auth: new AuthModule(_client),
38-
db: new DatabaseModule(_client),
39-
storage: new StorageModule(_client),
37+
auth: _client.auth,
38+
db: _client.db,
39+
storage: _client.storage,
4040
};
4141
}, [apiKey, baseUrl]);
4242

0 commit comments

Comments
 (0)