typescript-simple | Simple API to compile TypeScript code string | Runtime Evironment library
kandi X-RAY | typescript-simple Summary
kandi X-RAY | typescript-simple Summary
Simple API to compile TypeScript code string to JavaScript. That's all!
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of typescript-simple
typescript-simple Key Features
typescript-simple Examples and Code Snippets
Community Discussions
Trending Discussions on typescript-simple
QUESTION
I'm getting the good old
invariant.js:44 Uncaught Error: addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's
render
method, or you have multiple copies of React loaded
The refs are definitely not the problem (they are in the render method, and the issue persists after they're removed). I also don't have multiple copies of react - there is not a single additional copy in node_modules, npm ls react returns a single instance, I have no react plugins installed. I'm using webpack.
adding aliases in webpack config didn't help, reinstalling dependencies didn't help, removing react and linking it from outside npm/webpack didn't help.
here's my webpack config:
...ANSWER
Answered 2017-Jul-26 at 11:50As I've written before, the error is horrible and the error message is unhelpful.
The actual reason was jquery (the project is being migrated to react but relies on some jquery plugins). Despite working properly, react would only allow it to be called through an import. Once I started calling it like this
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install typescript-simple
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page