Git Product home page Git Product logo

Comments (4)

jeremy-dorfschmidt avatar jeremy-dorfschmidt commented on August 15, 2024 1

import Intercom from 'react-intercom' should solve this issue. I initially had { } around Intercom and had the same error.

from react-intercom.

nhagen avatar nhagen commented on August 15, 2024

I was able to set this up just now in a new application without any special configuration--in the setup process, they automatically moved me to the next phase when I refreshed my page after inserting the component.

Any additional context you can share that could reproduce this? Unfortunately it is kind of annoying to create new Intercom instances just to test this.

Anyways, marking as resolved.

from react-intercom.

jeremy-dorfschmidt avatar jeremy-dorfschmidt commented on August 15, 2024

@nhagen Just following up on this, so we shouldn't have to import Intercom from 'react-intercom'? A question around that is, then how does React know anything about the <Intercom .... /> component? I have react-intercom installed (package.json), however wiring the component just as per the instructions on the front page, no import in component, no script import. I have in my app <Intercom appID="my app id" {...user}/> when I do this I get the following issue warning/errors.Warning: i(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object. a.(anonymous function) invariant.js:44 Uncaught Error: i(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.

from react-intercom.

nhagen avatar nhagen commented on August 15, 2024

Sorry, I'll add the import to the README to make it more clear. I am able to get past the verification step by simply importing the component as normal and use it in an application.

Can you provide an example of your code? That would help me understand if there's a specific way you're doing this that I haven't considered which doesn't work.

Edit: after updating the readme, I realize it wasn't apparent that the export you needed was the default export rather than a named export--if you're doing import { Intercom } from 'react-intercom', Intercom will be undefined, possibly causing that error you're getting. It should be import Intercom from 'react-intercom'

from react-intercom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.