score:1
the thing with webpack is that the classes you have created are properly encapsulated from the outside world. the error you are getting
warning: react.createelement: type should not be null, undefined, boolean, or number.
it should be a string (for dom elements) or a reactclass (for composite components).
is an error with react when react cannot find the class declaration anywhere. while i would suggest you follow the proper way and instantiate it in an index.jsx file, you can still make that work by doing this hack in dropdown.jsx
window.dropdown = dropdown
this would make sure that your external non webpack compiled javascript can see the dropdown class. but this is bad pactice and i would really suggest you stick with the index.jsx file as it protects you from exposing your classes and libraries from the global namespace and its a best practice.
Source: stackoverflow.com
Related Query
- React JSX class library exports are not working
- React Context API not working from custom NPM component library
- React : CSS class name import not working
- fireEvent.keyDown not working as expected on my Jest + React Testing Library test
- why if-else condition is not working while using in react jsx
- React testing library fireEvent.click not working
- webpack and react jsx - hot loading not working with docker container
- React class styling from css stylesheet not working
- React Hooks State update one step behind. For this reason my changes are not working correctly
- Routes are not working with React router v4
- react gatsby: adding css class dynamically not working in prod build
- Dropdowns are not working using react-draft-wysiwyg in React JS
- HTML5 video not working on iphone with react jsx
- React global SCSS: class styling not working
- Not able to add, update, delete rows in material table react using class based component. Previously it was working with functional component
- onClick inside mapped object JSX for React NextJS not working
- React hooks not working when imported from local library
- React jsx variable to element inline style not working
- React Router V4 nested routers are not working on page reload
- paths are not working in React Typescript
- React clearInterval not working in class Component
- font-face are not working with rollup config - component library
- VS Code + React + JSX + Components props intellisense is not working
- Checkboxes are not working in todo in react js
- React render method not working when referencing jsx file in html
- React JS Login and Router are not working as expected
- React Function call not working when mapped in JSX
- Active class not working in NavLink of react-router-dom library
- Material UI popover not working with react class component
- testing a react form with pure Jest library (no enzyme) not working
More Query from same tag
- React Router Link from another component wont work
- Uncaught Error: "category" is not a registered scale
- How to do a "search function " in react when using axios to call information from Json?
- Component not updating on Map (dictionary) state change using hooks
- What is the best possible way to pass data between child components in React?
- Setting state on componentDidMount()
- Can we add click on material Ui Box
- isomorphic reactjs cdn assets
- App crashes when updating from app store or play store because it has old localstorage
- The 'this.props.history.push()' is working for normal page but not working for nested components?
- How handle long press event in react web
- Print an HTML tag from a string in an array using React
- Inlining box-sizing style in React
- Draft.js - How to trim contents
- dom is not defined error after transforming jsx to js
- Redux - should I get product details from state or api call?
- Firefox blocked resource due to Type mismatch
- How to append a component to an HTML document in ReactJS
- Render specific react component based on the URL
- How to update one part of state with setState
- React.js Retrieving data from specific row
- React Material UI tree view - Getting root node info on child node onNodeSelect
- React) "this.props" while sharing the "state" using router
- React Router - routes not working using a Fragment
- Iterate Over List of Objects but Insert a Calculated Value
- Adding custom css in react template
- Why is postman showing error message but react app not showing it?
- Creating a generalised onChange() function for different inputs without the use of name tag
- Can't iterate React component to create table. Unexpected token
- Pass A Function Down But Retain A Prop From Parent