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.

Undefined is not an object

See original GitHub issue

screen_shot

import {
  copilot,
  walkthroughable,
  CopilotStep
} from '@okgrow/react-native-copilot';

...

const Step1 = ({ copilot }) => <View {...copilot}><Text>Step 1</Text></View>;

...

<CopilotStep text="This is a hello world example!" order={1} name="hello">
  <Step1 />
</CopilotStep>
"dependencies": {
    "@okgrow/react-native-copilot": "^1.0.0",
    "expo": "24.0.2",
    "react": "^16.0.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-24.0.0.tar.gz",
  },

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
appjitsucommented, Jan 24, 2018

screen shot 2018-01-24 at 3 45 43 pm

import React, { Component } from 'react';
import PropTypes from 'prop-types';
import {
  Text,
  View,
} from 'react-native';
import { copilot, walkthroughable, CopilotStep } from '@okgrow/react-native-copilot';

const CopilotText = walkthroughable(Text);

class Home extends Component {
  componentWillMount() {
    if (true) {
      this.props.start();
    }
  }

  render() {
    return (
      <View>
        <CopilotStep text="This is a hello world example!" order={1} name="hello">
          <CopilotText>Hello world!</CopilotText>
        </CopilotStep>
      </View>
    );
  }
}

Home.propTypes = {
  start: PropTypes.func.isRequired,
};

export default copilot()(Home);
1reaction
mohebifarcommented, Jan 18, 2018

Have you applied the copilot HOC to the root component?

const RootComponent = () => <View>
  <CopilotStep text="This is a hello world example!" order={1} name="hello">
    <Step1 />
  </CopilotStep>
</View>;

const CopilotRootComponent = copilot(RootComponent);
Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: 'undefined' is not an object - Stack Overflow
TypeError : 'undefined' is not an object ; Use a Javascript debugger like Firebug or the built-in debugger of Chrome. You can put...
Read more >
TypeError: 'undefined' is not an object in JavaScript
The “TypeError: 'undefined' is not an object” error occurs when a property is accessed or a method is called on an undefined object....
Read more >
27/3 - TypeError: undefined is not an object (evaluating 'family ...
Here's the message: TypeError: undefined is not an object (evaluating 'family[i].name') The code outputs the right values to the console, ...
Read more >
ERROR TypeError: undefined is not an object (evaluating ...
The solution… Ever encountered this error → ERROR TypeError: undefined is not an object (evaluating '_this. props. navigation.
Read more >
undefined is not an object (evaluating 'mw.config.get ...
TypeError : undefined is not an object (evaluating 'mw.config.get('wgFormattedNamespaces')[namespace].replace'). Closed, ResolvedPublic. Actions.
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