Invariant violation on React Native
See original GitHub issueAwesome 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 (receivedundefined
). 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:
- Created 2 years ago
- Reactions:3
- Comments:7 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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😄
Hi everyone 👋 , theres is no plan to make the library work on react-native. We recommend using other implementations, like the one @luhart made 👍 .