@spree/docs 0.1.260 → 0.1.261
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.
|
@@ -125,6 +125,15 @@ import { adminClient } from '@spree/dashboard-core'
|
|
|
125
125
|
|
|
126
126
|
The shared `@spree/admin-sdk` instance configured for the host's API URL. Use this everywhere instead of constructing your own.
|
|
127
127
|
|
|
128
|
+
The package entry point loads the whole framework — every registry, component and translation. A small host app that builds its own screens and only needs the client and sign-in can import from subpaths instead, which keeps the rest out of its bundle:
|
|
129
|
+
|
|
130
|
+
```ts
|
|
131
|
+
import { adminClient } from '@spree/dashboard-core/client' // the SDK instance alone
|
|
132
|
+
import { setApiClient } from '@spree/dashboard-core/api-client' // registers the client the providers use
|
|
133
|
+
import { AuthProvider } from '@spree/dashboard-core/providers/auth-provider'
|
|
134
|
+
import { useAuth } from '@spree/dashboard-core/hooks/use-auth'
|
|
135
|
+
```
|
|
136
|
+
|
|
128
137
|
### Providers
|
|
129
138
|
|
|
130
139
|
```ts
|