-
Notifications
You must be signed in to change notification settings - Fork 11
docs: adopt Rive's "new runtime" / "legacy runtime" terminology #351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f508375
docs: adopt Rive's "new runtime" / "legacy runtime" terminology
mfazekas bb40093
docs: finish new-runtime wording; mark getBackend() internal
mfazekas 4a2543e
docs: add the 0.4 -> 0.5 -> 0.6 migration guide
mfazekas eda71e0
docs: describe plain runtime behavior in API docs, keep backend talk …
mfazekas 9cdad6f
docs: soften legacy-runtime removal to "a future release" per review
mfazekas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # Migrating to 0.5 (the new Rive runtime) | ||
|
|
||
| 0.5 switches the library to Rive's new CommandQueue-based runtime | ||
| ([New Runtime](https://rive.app/docs/runtimes/apple/apple) on iOS, | ||
| [New Compose API](https://rive.app/docs/runtimes/android) on Android) and | ||
| completes the move to the async JS API. The recommended path: | ||
|
|
||
| ## 1. On the latest 0.4.x: move to the async APIs | ||
|
|
||
| The full async surface already ships in 0.4 — migrate there first, while | ||
| everything still behaves exactly as before. Your editor's deprecation | ||
| strikethroughs point at each replacement: | ||
|
|
||
| | Deprecated | Use instead | | ||
| | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | ||
| | `property.value` (read / write) | `getValueAsync()` / `set(value)` | | ||
| | `viewModel(path)` | `viewModelAsync(path)` | | ||
| | `createInstanceByName/ByIndex`, `createDefaultInstance`, `createInstance` | `createInstanceByNameAsync`, `createDefaultInstanceAsync`, `createBlankInstanceAsync` | | ||
| | `viewModelByName/ByIndex`, `defaultArtboardViewModel` | `viewModelByNameAsync`, `defaultArtboardViewModelAsync` | | ||
| | list `length`, `getInstanceAt`, `addInstance(At)`, `removeInstance(At)`, `swap` | the `*Async` equivalents | | ||
| | `artboardNames`, `artboardCount`, `viewModelCount`, `propertyCount`, `instanceCount`, `getEnums` (sync) | the `*Async` equivalents | | ||
| | `useViewModelInstance(file)` (sync creation) | `useViewModelInstance(file, { async: true })` | | ||
| | state-machine inputs / text runs / Rive events on the view | [data binding](https://rive.app/docs/runtimes/data-binding) | | ||
|
|
||
| ## 2. Try the 0.5 beta | ||
|
|
||
| ```sh | ||
| npm install @rive-app/react-native@next | ||
| ``` | ||
|
|
||
| The new runtime is now the default. Things to know: | ||
|
|
||
| - Deprecated sync APIs still work, but they block the JS thread and log a | ||
| once-per-member `[Rive/Deprecation]` warning. | ||
| - The deprecated state-machine-input, text-run, and Rive-event view methods | ||
| **throw** — data binding replaces them. | ||
| - Property accessors (`numberProperty(path)` etc.) return unvalidated | ||
| handles; a typo'd path surfaces via the `getValueAsync()` rejection or the | ||
| `useRive*` hooks' `error` result instead of an `undefined` return. | ||
| - `updateReferencedAssets` (runtime asset swapping) is not supported. | ||
|
|
||
| ## 3. 0.5 stable | ||
|
|
||
| Same behavior as the beta: fully migrated apps run warning-free; remaining | ||
| deprecated calls keep working with runtime warnings. | ||
|
|
||
| ## 4. 0.6 | ||
|
|
||
| Removal of the deprecated APIs is planned for 0.6. Apps that completed | ||
| step 1 need no further changes. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.