question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invariant violation on React Native

See original GitHub issue

Awesome project! Does this work with React Native? I tried installing it but get this error when calling Avatar:

Invariant Violation: View config getter callback for component rect must be a function (received undefined). Make sure to start component names with a capital letter.

I’m using the example code.

import Avatar from "boring-avatars";

<Avatar
  size={40}
  name="Maria Mitchell"
  variant="marble"
  colors={["#92A1C6", "#146A7C", "#F0AB3D", "#C271B4", "#C20D90"]}
/>;
"react": "17.0.1",
"react-native": "0.64.1",

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
luhartcommented, Jul 18, 2021

@joebernard @kacgrzes @RohovDmytro @VirenMohindra @mayank-budhiraja

Hi everyone, I’ve made a react native library for boring-avatars. You can check it out here. Enjoy😄

0reactions
josepmartinscommented, Jul 20, 2021

Hi everyone 👋 , theres is no plan to make the library work on react-native. We recommend using other implementations, like the one @luhart made 👍 .

Read more comments on GitHub >

github_iconTop Results From Across the Web

React-Native Invariant Violation: Element type is invalid
Invariant Violation : Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got ...
Read more >
Invariant Violation: ViewPropTypes has been removed from ...
Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. ERROR Invariant Violation: Module AppRegistry is not a registered callable module ( ...
Read more >
"Application has not been registered" error
... or React Native app, it's not uncommon to run into an error that looks like: Application "main" has not been registered. or....
Read more >
invariant violation: "main" has not been registered. this can ...
{ AppRegistry, Platform } from 'react-native'; ; import App from './App'; ; registerComponent('X', () => App); ; if ...
Read more >
ListView has been removed from React Native - Reddit
99K subscribers in the reactnative community. ... r/reactnative - Invariant Violation: ListView has been removed from React Native.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found