New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-isomorphic-scriptloader

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-isomorphic-scriptloader

Load scripts with ease

latest
Source
npmnpm
Version
3.0.2
Version published
Weekly downloads
6
20%
Maintainers
1
Weekly downloads
 
Created
Source

React Isomorphic ScriptLoader

A lightweight React component to load scripts into your isomorphic (server-side rendered) web application.

Features

  • Isomorphic/Universal: Works on both server (SSR) and client.
  • Modern Stack: Built with TypeScript, supports React 18 and React 19.
  • Zero Dependencies: Lightweight and efficient.
  • Typed: Includes first-class TypeScript definitions.

Installation

# npm
npm install react-isomorphic-scriptloader

# yarn
yarn add react-isomorphic-scriptloader

# pnpm
pnpm add react-isomorphic-scriptloader

Usage

Functional Component (Hooks)

import React, { useState } from 'react';
import ScriptLoader from 'react-isomorphic-scriptloader';

export default function MyComponent() {
  const [scriptsLoaded, setScriptsLoaded] = useState(false);

  return (
    <div>
      <ScriptLoader 
        src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places" 
        onLoad={() => setScriptsLoaded(true)} 
      />
      
      {scriptsLoaded ? (
        <div>Google Maps Loaded!</div>
      ) : (
        <div>Loading Maps...</div>
      )}
    </div>
  );
}

Props

PropTypeDescription
srcstringThe URL of the script to load.
onLoad() => voidCallback function executed when the script has loaded.

License

This package is licensed under the MIT License.

Keywords

react

FAQs

Package last updated on 01 Mar 2026

Did you know?

Socket

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.

Install

Related posts