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.

Quickstart snippet not working

See original GitHub issue

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

  • bug report
  • feature request

Issue description

Current behavior: The quickstart snippet from the main website is not functioning

Expected behavior: The quickstart code should execute without errors

Steps to reproduce: Install the UI kit + Eva via NPM Use the code(see below)

Related code:

import React from 'react';
import { Button } from 'react-native-ui-kitten';
export const AwesomeButton = () => (
 <Button>BUTTON</Button>

Other information:

The error: Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s%s, undefined, You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

This error makes no sense to me since the component is being exported, I’ve checked the theme folder.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
artyorshcommented, Jun 18, 2019

This will not render a Button because you didn’t place it in a render method. I suggest you reading React Native documentation before you start.

1reaction
artyorshcommented, Jun 18, 2019

We’re working on updating it with a JavaScript examples. For now, if you’re not familiar with TypeScript, use the following code:

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

export default App = () => (
  <ApplicationProvider
    mapping={mapping}
    theme={lightTheme}>
    <Layout style={{flex: 1}}/>
  </ApplicationProvider>
);
Read more comments on GitHub >

github_iconTop Results From Across the Web

Snippets in Visual Studio Code
Snippets in Visual Studio Code. Code snippets are templates that make it easier to enter repeating code patterns, such as loops or conditional-statements....
Read more >
[Resolved] Custom Code Snippet not running - Toolset
I have some code to register and conditionally enqueue a css file, but it is not running. It works fine when in functions.php...
Read more >
Code Snippets not working - MSDN - Microsoft
I have a code snippet that has been working with previous versions of Visual Studio. But with VS 2015 it no longer works....
Read more >
Are VS Code HTML Snippets /Emmets not working for React ...
Are VS Code HTML Snippets /Emmets not working for React(.jsx)? · Step 1: File > Preferences > Settings · Step 2: · Step...
Read more >
Write React Faster with the Simple React Snippets VSCode ...
While we believe that this content benefits our community, we have not yet thoroughly reviewed it. If you have any suggestions for ...
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