@teamkeel/client-react 0.368.2 → 0.369.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/package.json +1 -1
  2. package/readme.md +6 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamkeel/client-react",
3
- "version": "0.368.2",
3
+ "version": "0.369.0",
4
4
  "description": "React helpers for Keel clients",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/readme.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @teamkeel/client-react
2
2
 
3
- Typed useKeel Hook from a generated Keel client
3
+ Create a fully typed `useKeel()` hook from a generated Keel client.
4
4
 
5
5
  ## Install
6
6
 
@@ -10,7 +10,7 @@ npm i @teamkeel/client-react
10
10
 
11
11
  ## Usage
12
12
 
13
- Export the `KeelProvider` and `useKeel` components based on your generated client.
13
+ Create the `KeelProvider` and `useKeel` components by passing your generated APIClient into the `keel` function from this package.
14
14
 
15
15
  N.B. [See here](https://docs.keel.so/apis/client) for documentation on generating a client
16
16
 
@@ -21,7 +21,9 @@ export const { KeelProvider, useKeel } = keel(APIClient);
21
21
 
22
22
  ```
23
23
 
24
- Wrap your app with the exported `KeelProvider`
24
+ Wrap your app with the exported `KeelProvider` and set the endpoint for you API.
25
+
26
+ The endpoint is the base URL + the api name (if you haven't manually set an API name this is `api`). This url can be found in the Keel web console or in the output of `keel run` in your terminal.
25
27
 
26
28
  ```tsx
27
29
 
@@ -31,7 +33,7 @@ Wrap your app with the exported `KeelProvider`
31
33
 
32
34
  ```
33
35
 
34
- Now you can use the typed `useKeel` hook in any component within your app
36
+ Now you can use the typed `useKeel` hook in any component within your app. You can [read more here](https://docs.keel.so/apis/client) on how to use the client.
35
37
 
36
38
  ```ts
37
39
  function MyComponent() {