GithubHelp home page GithubHelp logo

Comments (7)

zjjott avatar zjjott commented on May 1, 2024 1

var ModalPortal = React.createFactory(require('./ModalPortal'));
raise:
Uncaught TypeError: Cannot read property 'createFactory' of undefined

from react-modal.

mzabriskie avatar mzabriskie commented on May 1, 2024

Do you have any code that you can share?

from react-modal.

laran avatar laran commented on May 1, 2024

I'm getting a similar error.

My main app entry point is here:
https://github.com/laran/warehouse/blob/master/warehouse-application-starter/src/main/resources/static/index.html

These are the two files that fail to load properly:

And here's the error that I get:

screen shot 2015-09-21 at 1 28 03 am

from react-modal.

laran avatar laran commented on May 1, 2024

If I add this before the code that loaded my application (specifically here) I get past that error:

var React = require(['react']);

But then I get a different error on this line:
https://github.com/rackt/react-modal/blob/master/lib/components/ModalPortal.js#L2

... because I'm using JSX, and according to the docs React.DOM should never be used when using JSX.

So, I tried replacing React.DOM.div with React.createElement('div') and that failed with "Uncaught TypeError: React.createElement is not a function".

Ideas?

from react-modal.

TurBoss avatar TurBoss commented on May 1, 2024

well I notice that requirejs didn't work with django-pipeline :(
maybe i will switch to django-require
so is my fault

thx

from react-modal.

francisgwhitesell avatar francisgwhitesell commented on May 1, 2024

I am also having this issue. I'm importing react and react-modal without module loading.
import Modal from 'react-modal';
and I get:
image
and:
image
similar to @laran .

from react-modal.

geetotes avatar geetotes commented on May 1, 2024

@francisgwhitesell that probably means that React is undefined. Are you loading React before you load react-modal?

from react-modal.

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.