Comments (7)
var ModalPortal = React.createFactory(require('./ModalPortal'));
raise:
Uncaught TypeError: Cannot read property 'createFactory' of undefined
from react-modal.
Do you have any code that you can share?
from react-modal.
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:
- https://github.com/laran/warehouse/blob/master/warehouse-application-starter/src/main/resources/static/warehouse/js/components/flash-modal.jsx
- https://github.com/laran/warehouse/blob/master/warehouse-application-starter/src/main/resources/static/warehouse/js/components/login-modal.jsx
And here's the error that I get:
from react-modal.
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.
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.
I am also having this issue. I'm importing react and react-modal without module loading.
import Modal from 'react-modal';
and I get:
and:
similar to @laran .
from react-modal.
@francisgwhitesell that probably means that React
is undefined. Are you loading React before you load react-modal?
from react-modal.
Related Issues (20)
- Peer dependencies not working with react 18+ HOT 6
- Uncaught NotFoundError: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node
- Replace focus trap with `inert` HOT 1
- Focus on the input element is lost when trying to scroll modal content by dragging scrollbar
- Focus trap incorrectly finds tabbable elements HOT 11
- Modal doesn't close on the first click on the overlay after click on elements containing event.stopPropagation() inside modal HOT 11
- Add support for React & Node 18 (as easy as adding startTransition() on each setState) HOT 18
- When I try to apply css variables from css modules in React, nothing is passed HOT 9
- Npm start related issue
- Why convert position property to inset? HOT 2
- Analysis: 90% of dependency updates in this repository can be merged.
- Should use event.key not event.code
- How can i make the modal overlay non blocking? HOT 2
- Resize error when moving tab around HOT 2
- Display blurry when elements with position attributes and have scrollbars. HOT 3
- Close the modal window on the first click when using stopPropagation() HOT 3
- Replace shouldReturnFocusAfterClose={boolean} with returnFocusTo={Element} HOT 3
- Review all additional systems that react-modal uses (see helpers folder)
- Allow users to use timeout-based or css events to control modal animation.
- Use github actions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-modal.