You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Install the "Ably CLI":https://www.npmjs.com/package/@ably/cli : @npm install -g @ably/cli@
28
+
* Install the "Ably CLI":https://www.npmjs.com/package/@ably/cli : @npm install -g @ably/cli@
29
29
* Run @ably login@ in the terminal and follow the prompts to provide an access token to the Ably CLI.
30
30
* Set the default app to use with @ably apps switch@ and select an API key to use for operations with @ably auth keys switch@.
31
31
@@ -60,32 +60,30 @@ Create a new React + TypeScript project using Vite. Select the following options
60
60
61
61
For detailed instructions, refer to the "Vite documentation":https://vitejs.dev/guide/#scaffolding-your-first-vite-project.
62
62
63
-
<aside data-type='note'>
64
-
<p>You should see a directory structure similar to this:</p>
65
-
<code>
66
-
├── index.html
67
-
├── package.json
68
-
├── public
69
-
├── src
70
-
│ ├── assets
71
-
│ ├── App.css
72
-
│ ├── App.tsx
73
-
│ ├── index.css
74
-
│ ├── main.tsx
75
-
│ └── vite-env.d.ts
76
-
├── tsconfig.app.json
77
-
├── tsconfig.json
78
-
├── tsconfig.node.json
79
-
└── vite.config.ts
80
-
</code>
81
-
</aside>
63
+
You should see a directory structure similar to this:
64
+
<code>
65
+
├── index.html
66
+
├── package.json
67
+
├── public
68
+
├── src
69
+
│ ├── assets
70
+
│ ├── App.css
71
+
│ ├── App.tsx
72
+
│ ├── index.css
73
+
│ ├── main.tsx
74
+
│ └── vite-env.d.ts
75
+
├── tsconfig.app.json
76
+
├── tsconfig.json
77
+
├── tsconfig.node.json
78
+
└── vite.config.ts
79
+
</code>
82
80
83
81
You also need to set up Tailwind CSS for styling the application. For installation instructions, see the "Tailwind CSS documentation for Vite":https://tailwindcss.com/docs/installation/using-vite.
84
82
85
83
Once installed, remove any existing styles from your @src/index.css@ file and ensure that it contains only the Tailwind CSS import:
Ensure you replace the @{{API_KEY}}@ placeholder with your actual Ably API key.
141
-
142
138
<aside data-type='note'>
143
139
<p>Keep the Realtime client initialization outside of any React component to prevent it from being recreated on re-renders, which could result in reaching your Ably connection limit.</p>
144
140
</aside>
@@ -176,7 +172,7 @@ Clients establish a connection with Ably when they instantiate an SDK instance.
176
172
177
173
In the "Set up AblyProvider":#prerequisites-setup-ably-provider section, you added the following code to create a new Ably Realtime client:
0 commit comments