rive-app / rive-app/rive-react-native
No default ViewModel found for artboard Artboard.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 783
- Forks
- 81
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 3
Description
import Rive, { AutoBind, RNRiveError, RNRiveErrorType, useRive } from 'rive-react-native';
import { View } from 'react-native';
import { useRef } from 'react';
export default function Demo() {
const [setRiveRef, riveRef] = useRive()
console.log(riveRef)
return (
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
<Rive
ref={setRiveRef}
dataBinding={AutoBind(true)}
source={require('@/assets/animations/animacao.riv')}
artboardName='Artboard'
onError={(riveError: RNRiveError) => {
switch (riveError.type) {
case RNRiveErrorType.DataBindingError: {
console.error(`${riveError.message}`)
return
}
default:
console.error('Unhandled error')
return
}
}}
style={{ width: 300, height: 300 }}
/>
</View>
);
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the error with the supplied Demo component, focusing on the Rive component's AutoBind data-binding path and the referenced animacao.riv asset. Trace how the Artboard and its default ViewModel are resolved, then verify the intended behavior with a regression test; the issue does not name a source file or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100