
Security News
Official Go SDK for MCP in Development, Stable Release Expected in August
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
react-external-script-loader
Advanced tools
Library for loading external scripts
npm install react-external-script-loader
yarn add react-external-script-loader
import Loader from 'react-external-script-loader';
...
<Loader url="https://vk.com/js/api/openapi.js?160" global="VK" />
Property | Type | Description |
---|---|---|
url(required) | string | Url of external script |
global(required) | string | name of object if it loads successfully |
options | object | Script options - possible keys: {type, charset, async, defer}. You can ckeck it here |
onLoad | function | Called when script loaded (global: object): void |
onError | function | Called when script loading was failed void |
import Loader from 'react-external-script-loader';
class App extends React.Component {
state = {
load: false,
};
render() {
const { load } = this.state;
return (
<div className="App">
<h1>React External Script Loader Example</h1>
<button onClick={() => this.setState({ load: true })}>
Load external script
</button>
{load && (
<>
<div id="vk_playlist_-2000646569_646569" />
<Loader
url="https://vk.com/js/api/openapi.js?160"
global="VK"
onLoad={VK =>
VK.Widgets.Playlist(
'vk_playlist_-2000646569_646569',
-2000646569,
646569,
'ae82627d6c8bb4500d',
)
}
/>
</>
)}
</div>
);
}
}
const rootElement = document.getElementById('root');
ReactDOM.render(<App />, rootElement);
You can clone this repository and check example
git clone https://github.com/mmarkelov/react-external-script-loader.git
cd ./react-external-script-loader/example
yarn && yarn run dev
FAQs
React component for loading external scripts
The npm package react-external-script-loader receives a total of 278 weekly downloads. As such, react-external-script-loader popularity was classified as not popular.
We found that react-external-script-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.