Skip to content

Commit f322357

Browse files
docs(readme): tidy code blocks
1 parent 3d192c4 commit f322357

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ new Phaser.Game({
3535

3636
Without JSX:
3737

38-
```js
38+
```ts
3939
// index.js
4040
import Phaser from 'phaser';
4141
import { jsx, render } from 'phaser-jsx';
@@ -74,13 +74,13 @@ yarn add phaser-jsx
7474

7575
ES Modules:
7676

77-
```js
77+
```ts
7878
import { createElement, render } from 'phaser-jsx';
7979
```
8080

8181
CommonJS:
8282

83-
```js
83+
```ts
8484
const { createElement, render } = require('phaser-jsx');
8585
```
8686

@@ -126,7 +126,7 @@ Update your `tsconfig.json`:
126126

127127
Update your Vite config:
128128

129-
```js
129+
```ts
130130
// vite.config.mjs
131131
import { defineConfig } from 'vite';
132132

@@ -165,9 +165,9 @@ If you need nesting and relative positioning, use `Container`:
165165

166166
### `useScene`
167167

168-
If you have a single Scene, retrieve it with the `useScene` hook:
168+
Retrieve the current Scene with the `useScene` hook:
169169

170-
```js
170+
```ts
171171
import { useScene } from 'phaser-jsx';
172172

173173
function MyComponent() {
@@ -179,7 +179,7 @@ function MyComponent() {
179179
> [!WARNING]
180180
> Don't use the `useScene` hook if you start multiple Scenes.
181181
182-
To specify a Scene class in TypeScript:
182+
Type your Scene with TypeScript:
183183

184184
```ts
185185
class MyScene extends Phaser.Scene {

0 commit comments

Comments
 (0)