react-script-hook icon indicating copy to clipboard operation
react-script-hook copied to clipboard

React hook to dynamically load an external script and know when its loaded

Results 11 react-script-hook issues
Sort by recently updated
recently updated
newest added

Hi @hupe1980, I saw you released a new version just recently (and you [updated version numbers from 1.4.1 to 1.6.0](https://github.com/hupe1980/react-script-hook/commit/5c95fb679eeb2efce5322cceaeb0e0826665f91c)). The only issue I have now is getting to know...

Steps to reproduce: `npx create-react-app myApp` `cd myApp` `npm i react-script-hook` Add import to to src/App.js: `import useScript from 'react-script-hook'` or `import useScript from 'react-script-hook/lib/use-script'` `npm run build` Result: ......

If the variable `shouldLoadStripe` in the [Conditionally calling a script](https://github.com/hupe1980/react-script-hook#conditionally-calling-a-script) example changes to `true` on subsequent runs, the script still won't load. Example: https://codesandbox.io/s/clever-pike-d5cdkq?file=/src/App.js Is this intended? If not, the...

When using the `checkForExisting` option, start the loading state as `false` and only set loading to true if the script does not already exist. Resolves #24

We're facing an issue where if the hook un-mounts before the `onload` handler being called, the value of `load` remains `true` indefinitely. This makes sense if you read through the...

Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.11 to 3.9.15. Release notes Sourced from vm2's releases. 3.9.15 Fixes https://github.com/patriksimek/vm2/commit/d534e5785f38307b70d3aac1945260a261a94d50: Ensure no host objects are passed through to Error.prepareStackTrace. (Thanky to Seongil Wi from KAIST...

dependencies

Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1. Commits 2449650 Update mocha 560b2d8 Don't use regex to trim whitespace b1bdb92 Remove linting package zoo c20dc7e Cache 308 See full diff in compare...

dependencies

Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2. Release notes Sourced from json5's releases. v1.0.2 Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a...

dependencies

The current type used for `ScriptProps` is as follows: ```typescript export interface ScriptProps { src: HTMLScriptElement['src'] | null; checkForExisting?: boolean; [key: string]: any; } ``` Where the type of attributes...

Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2. Commits 699c459 3.1.2 2f2b5ff fix: trim pattern 25d7c0d 3.1.1 55dda29 fix: treat nocase:true as always having magic 5e1fb8d 3.1.0 f8145c5 Add 'allowWindowsEscape' option 570e8b1...

dependencies