yariv / reactscriptloader Goto Github PK
View Code? Open in Web Editor NEWA library for creating React components that depend on external scripts.
License: MIT License
A library for creating React components that depend on external scripts.
License: MIT License
I have a warning in our project
npm WARN engine [email protected]: wanted: {"node":"0.10.x"} (current: {"node":"4.7.2","npm":"2.15.11"})
I see this code in package.json of ReactScriptLoader
"engines": { "node": ">=0.10.x" },
Maybe version 0.10.x is not valid. It should be 0.10.0 instead
Please refer: https://docs.npmjs.com/files/package.json#engines
Any thoughts of adding this to npm?
I can always simply clone the repo, but still.
getScriptURL is not a function https://github.com/yariv/ReactScriptLoader/blob/master/ReactScriptLoader.js#L84
Just a little advice: change that name to something like ReactStripeButton
because checkout.js
defines StripeButton
, too, so when you build the React objects the first time all is fine (because stripe's script is loaded asynchronously), then if something happens that require to access again to the React object StripeButton
was pointing to (like a setState()
call), React throws exception (Uncaught TypeError: type.toUpperCase is not a function
).
Really a little nasty bug, it took my hours to figure out and fix it.
Getting this error. Checked it out
ln 60: observer = observers[key];
should be
var observer = observers[key];
?
Need a way to load an array of multiple scripts.
I get an error:
Failed to execute 'write' on 'Document': It isn't possible to write into a document
from an asynchronously-loaded external script unless it is explicitly opened.
I am almost certain that I need ReactScriptLoader. Would it be too much to ask if you could also support CSS?
Hi,
When installing ReactScriptLoader with npm with the following declarating in my package.json
file:
"react-script-loader": "0.0.1",
I am not getting the latest version of the code, i.e there are changes in master that aren't showing up in the copy installed in my node_modules
folder.
I have to use:
"react-script-loader": "yariv/ReactScriptLoader#4004db47edf5b4e770f7f9796d73f70392d6c339",
Any idea why this is? Is npm caching an earlier version of the library?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.