@times-visuals/script-loader

1.2.0 • Public • Published

Script Loader

Simple React component for loading a script before rendering its children

Installation

# Yarn
$ yarn add @times-visuals/script-loader

# npm
$ npm add @times-visuals/script-loader

Usage

import ScriptLoader from "@times-visuals/script-loader";

export default () => (
  <ScriptLoader src="url/to/script">
    {() => (
      <div>Hello, world! This renders once the `src` script has loaded</div>
    )}
  </ScriptLoader>
);

Readme

Keywords

none

Package Sidebar

Install

npm i @times-visuals/script-loader

Weekly Downloads

0

Version

1.2.0

License

BSD-3-Clause

Unpacked Size

7.61 kB

Total Files

5

Last publish

Collaborators

  • danielbenclark
  • chrishutchinson
  • times-machine