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.

Have error when use Icon component

See original GitHub issue

Issue type

I’m submitting a … (check one with “x”)

  • bug report
  • feature request

Issue description

Current behavior:

When I use Icon component, sometime I encounter error “view nested within a text must have a width and height”

Expected behavior:

It should not have error and crash app Steps to reproduce:

Use Icon component Related code:

Not applicable.

Other information:

OS, device, package version

samsung device
"react-native": "0.60.5"
"react": "16.9.0"
"@ui-kitten/eva-icons": "4.2.0-beta.2"
"@eva-design/eva": "1.1.0-beta.1"

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
DinhHuyHoangcommented, Sep 26, 2019

I solved my problem, the error fired when I wrap Text component with Icon component

Thank for your help.

On Wed, Sep 25, 2019 at 12:41 AM Artur Yorsh notifications@github.com wrote:

Please try refactoring to something like this as it looks like we were wrong about this guide The main point is to render IconRegistry before ApplicationProvider.

import React from ‘react’;import { mapping, light as lightTheme } from ‘@eva-design/eva’;import { EvaIconsPack } from ‘@ui-kitten/eva-icons’;import { ApplicationProvider, IconRegistry, Layout, Text } from ‘react-native-ui-kitten’; const App = () => ( <React.Fragment> <IconRegistry icons={EvaIconsPack} /> <ApplicationProvider mapping={mapping} theme={lightTheme}> <YourApp /> </ApplicationProvider> <React.Fragment /> ); export default App;``

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/akveo/react-native-ui-kitten/issues/633?email_source=notifications&email_token=AGHR4HPNORJJDOOCLXGRESTQLJGMJA5CNFSM4IY6DQLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7PGLHQ#issuecomment-534668702, or mute the thread https://github.com/notifications/unsubscribe-auth/AGHR4HLWREJIGMU43YVDR3DQLJGMJANCNFSM4IY6DQLA .

0reactions
artyorshcommented, Sep 24, 2019

Please try refactoring to something like this as it looks like we were wrong about this guide The main point is to render IconRegistry before ApplicationProvider.

import React from 'react';
import { mapping, light as lightTheme } from '@eva-design/eva';
import { EvaIconsPack } from '@ui-kitten/eva-icons';
import { ApplicationProvider, IconRegistry, Layout, Text } from 'react-native-ui-kitten';

const App = () => (
  <React.Fragment>
    <IconRegistry icons={EvaIconsPack} />
    <ApplicationProvider
      mapping={mapping}
      theme={lightTheme}>
      <YourApp />
    </ApplicationProvider>
  <React.Fragment />
);

export default App;
Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do I have an error when I try a multiple import of icons in ...
Try this: import { InterestsRounded as InterestsRoundedIcon, AccountCircleRounded as AccountCircleRoundedIcon, SettingsRounded as ...
Read more >
Warnings and error icons on components - Cloud - 8.0
When a component is not properly defined or if the link to the next component does not exist yet, a red checked circle...
Read more >
React Icon Component - Material UI - MUI
Guidance and suggestions for using icons with MUI.
Read more >
Display Error Icons for Form Validation with ErrorProvider ...
Learn more about how to display error icons for form validation with the Windows Forms ErrorProvider component.
Read more >
Icons - Lightning Design System
If you're using Lightning components, see this documentation. ... Custom icons have a rounded square shape and use a class on the container...
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