rive-app / rive-app/rive-react-native

No default ViewModel found for artboard Artboard.

Open
#373 6 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triage
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.