Skip to content

docs(js/react): add deprecation docs for various parameters in the high-level JS/React runtime and use new stateMachine param in examples - #897

Merged
zplata merged 2 commits into
mainfrom
js/deprecations
Aug 27, 2026
Merged

docs(js/react): add deprecation docs for various parameters in the high-level JS/React runtime and use new stateMachine param in examples#897
zplata merged 2 commits into
mainfrom
js/deprecations

Conversation

@zplata

@zplata zplata commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Starting in v2.41.0/v4.33.0 of the JS/React runtimes respectively, we added deprecations for the following:

  • animations - initialization param
  • stateMachines - initialization param
  • automaticallyHandleEvents - initialization param related to Rive events
  • useStateMachineInput hook

Adds:

  • stateMachine - new param that is just a single string and will replace the stateMachines param

Those changes also deprecate events/text run/state machine input APIs so those should be touched on in the parameters pages as well.

…gh-level JS/React runtime and use new stateMachine param in examples
@zplata
zplata requested a review from a team as a code owner August 26, 2026 22:06
@mintlify

mintlify Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
rive 🟢 Ready View Preview Aug 26, 2026, 10:09 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the Rive documentation site to reflect new deprecations introduced in the high-level JS (v2.41.0) and React (v4.33.0) runtimes, and to switch examples over to the new singular stateMachine parameter.

Changes:

  • Replaces stateMachines with stateMachine across Web + React runtime guides and examples.
  • Expands parameter/reference docs to document newly deprecated params/APIs (events, loops/state change, inputs/text runs) and introduces/clarifies stateMachine.
  • Bumps the documented WebGL2 runtime version variable to 2.41.0.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
runtimes/web/web-js.mdx Updates getting-started examples to use stateMachine.
runtimes/web/state-machines.mdx Adds guidance on stateMachine and updates examples.
runtimes/web/semantics.mdx Updates semantics examples to use stateMachine.
runtimes/web/rive-parameters.mdx Documents new stateMachine, adds deprecation sections/notes, updates types and API docs.
runtimes/web/preloading-wasm.mdx Updates preloading example to use stateMachine.
runtimes/web/loading-assets.mdx Updates asset-loading example to use stateMachine.
runtimes/web/layouts.mdx Updates layout example to use stateMachine.
runtimes/web/fonts.mdx Updates fonts example to use stateMachine.
runtimes/web/faq.mdx Updates FAQ guidance and sample to use stateMachine.
runtimes/web/data-binding.mdx Updates data-binding examples to use stateMachine.
runtimes/web/canvas-vs-webgl.mdx Adds/updates example parameters to include artboard + stateMachine.
runtimes/web/caching-a-rive-file.mdx Updates caching example to use stateMachine.
runtimes/web/artboards.mdx Updates artboard example to include stateMachine.
runtimes/react/state-machines.mdx Updates React state machine docs/examples to use stateMachine.
runtimes/react/semantics.mdx Updates React semantics examples to use stateMachine.
runtimes/react/react.mdx Updates React getting-started examples/props to use stateMachine.
runtimes/react/preloading-wasm.mdx Updates React preloading example to use stateMachine.
runtimes/react/parameters-and-return-values.mdx Clarifies useStateMachineInput deprecation and documents component props including deprecated ones.
runtimes/react/layouts.mdx Updates React layouts examples to use stateMachine.
runtimes/react/fonts.mdx Updates React fonts example to use stateMachine.
runtimes/react/data-binding.mdx Updates React data-binding examples to use stateMachine.
runtimes/react/best-practices.mdx Updates best-practices example to use stateMachine.
runtimes/react/artboards.mdx Updates React artboards examples to include stateMachine.
docs.json Updates versionWebGL2 variable to 2.41.0.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread runtimes/web/state-machines.mdx Outdated
Comment thread runtimes/web/rive-parameters.mdx

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 25 out of 25 changed files in this pull request and generated no new comments.

Suppressed comments (2)

Previously missed (2) — in code that hasn't changed since the last review.

runtimes/react/parameters-and-return-values.mdx:147

  • This section describes the package’s default export as <RiveComponent />, but other React runtime docs in this PR use the default export component name <Rive /> (e.g. runtimes/react/layouts.mdx). Renaming here avoids confusion between the default <Rive /> component and the RiveComponent returned from useRive().
### `<RiveComponent />`

The `RiveComponent` default export and the `RiveComponent` returned from the `useRive` hook are both to be rendered in the JSX of a component. As noted previously, all attributes and event handlers that can be passed to a `canvas` element can also be passed to the `Rive` component and used in the same manner.

#### Props

runtimes/web/web-js.mdx:95

  • The stateMachine bullet says it "must be supplied", but the sentence that follows describes a valid fallback behavior when it’s omitted (playing the first linear animation). This is internally contradictory and can mislead readers into thinking the parameter is required.
    - `stateMachine` - A string representing the name of the state machine you wish to play. This must be supplied, or the Rive instance may only play the first linear animation it finds. In the next major version, the default behavior will be to play the artboard's default state machine when one exists.

@lancesnider lancesnider left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

One tiny nit, but feel free to merge if you disagree.


`scrub(animationNames?: string | string[], value?: number): void`

Scrubs the specified timeline animations to the given time; if none are specified, scrubs all of them. Deprecated in `v2.41.0` — use a state machine to control playback instead.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit - in other parts of the doc, you do #### scrub() (deprecated)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah I had that initially but then realized its already under a H3 Deprecated section so I think its ok its omitted here

@zplata
zplata merged commit 94a87d9 into main Aug 27, 2026
3 checks passed
@zplata
zplata deleted the js/deprecations branch August 27, 2026 14:23
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.

3 participants