Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscerie committed Jul 31, 2023
1 parent 7faf597 commit 210e15b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,19 @@

### Wally

Add the latest version of roact-spring to your wally.toml (e.g., `RoactSpring = "chriscerie/roact-spring@^0.0"`)
`roact-spring` has two packages to support [react-lua](https://github.com/jsdotlua/react-lua) and [legacy Roact](https://github.com/Roblox/roact). It's crucial to install the correct package or you **will** encounter bugs. To install, add the latest version of roact-spring to your wally.toml:

#### With react-lua
```console
RoactSpring = "chriscerie/react-spring@<version>"
```

Note: react-lua packages under the scope jsdotlua must use react-spring >= 2.0. react-lua packages under the legacy scope corepackages must use react-spring v1.

#### With legacy Roact
```console
RoactSpring = "chriscerie/roact-spring@<version>"
```

### roblox-ts

Expand Down
6 changes: 3 additions & 3 deletions docs/Getting Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ local function App(_)
end
```

`roact-spring` supports both [Roact17](https://github.com/grilme99/CorePackages) and [legacy Roact](https://github.com/Roblox/roact) with [roact-hooks](https://github.com/Kampfkarren/roact-hooks). Usage with legacy Roact and roact-hooks requires you to pass the `hooks` table to roact-spring's hooks.
`roact-spring` supports both [react-lua](https://github.com/jsdotlua/react-lua) and [legacy Roact](https://github.com/Roblox/roact) with [roact-hooks](https://github.com/Kampfkarren/roact-hooks). Usage with legacy Roact and roact-hooks requires you to pass the `hooks` table to roact-spring's hooks.

#### Using Roact17:
#### Using react-lua:
```lua
local function App(_)
local styles, api = RoactSpring.useSpring(function()
Expand All @@ -49,7 +49,7 @@ local function App(_, hooks)
end
```

The rest of this documentation's examples will assume we are using Roact17.
The rest of this documentation's examples will assume we are using react-lua.

## Getting started with class components

Expand Down
6 changes: 4 additions & 2 deletions docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ This library represents a modern approach to animation. It is the perfect bridge

### Wally

`roact-spring` has two packages to support [Roact17](https://github.com/grilme99/CorePackages) and [legacy Roact](https://github.com/Roblox/roact). It is important to install the correct package or you **will** encounter bugs. To install, add the latest version of roact-spring to your wally.toml:
`roact-spring` has two packages to support [react-lua](https://github.com/jsdotlua/react-lua) and [legacy Roact](https://github.com/Roblox/roact). It's crucial to install the correct package or you **will** encounter bugs. To install, add the latest version of roact-spring to your wally.toml:

#### With Roact17
#### With react-lua
```console
RoactSpring = "chriscerie/react-spring@<version>"
```

Note: react-lua packages under the scope jsdotlua must use react-spring >= 2.0. react-lua packages under the legacy scope corepackages must use react-spring v1.

#### With legacy Roact
```console
RoactSpring = "chriscerie/roact-spring@<version>"
Expand Down

0 comments on commit 210e15b

Please sign in to comment.