Skip to content

Conversation

ilyahuman
Copy link

Improve README installation description

Copy link
Collaborator

@trezy trezy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate the effort! We really need to remove most of the content from the README since it's all available on the website now. This is a solid start!

Comment on lines +38 to +63
**If you want to start a new React project from scratch, we recommend one of the following options:**

1. **Use the official [CLI tool to create PixiJS](https://pixijs.io/create-pixi/) projects, and choose the React
template:**

Select the React template from Framework Templates:

```bash
? Select a type of template: › - Use arrow-keys. Return to submit.
Bundler Templates
❯ Framework Templates
Creation Templates
Extension

✔ Select a type of template: › Framework Templates
? Select a variant: › - Use arrow-keys. Return to submit.
❯ React
```

**This will create a new React + Vite project, with Pixi.js and `@pixi/react` already preconfigured!**

2. **Manual React + Vite setup:**

You can also install [React + Vite](https://vite.dev/guide/), or use any other React-based framework (e.g. Remix,
Next.js, etc).
To add `@pixi/react` to an existing React project, simply install the required dependencies:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PixiJs Create actually provides the --template flag which can greatly simplify these instructions:

Suggested change
**If you want to start a new React project from scratch, we recommend one of the following options:**
1. **Use the official [CLI tool to create PixiJS](https://pixijs.io/create-pixi/) projects, and choose the React
template:**
Select the React template from Framework Templates:
```bash
? Select a type of template: › - Use arrow-keys. Return to submit.
Bundler Templates
❯ Framework Templates
Creation Templates
Extension
✔ Select a type of template: › Framework Templates
? Select a variant: › - Use arrow-keys. Return to submit.
❯ React
```
**This will create a new React + Vite project, with Pixi.js and `@pixi/react` already preconfigured!**
2. **Manual React + Vite setup:**
You can also install [React + Vite](https://vite.dev/guide/), or use any other React-based framework (e.g. Remix,
Next.js, etc).
To add `@pixi/react` to an existing React project, simply install the required dependencies:
If you want to start a new React project from scratch, we recommend using [PixiJS Create](https://pixijs.io/create-pixi/) with the PixiJS React template:
```bash
npm create pixi.js@latest pixi-project -- --template framework-react
```
If you prefer to setup your project manually, or you're installing in an existing project, PixiJS React can be installed via your package manager:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants