useLoadScript
The useLoadScript hook loads an external script tag in the browser. It allows React components to lazy-load third-party dependencies.
Anchor to propsProps
[src: string, options?: LoadScriptOptions][src: string, options?: LoadScriptOptions]Anchor to LoadScriptOptions
LoadScriptOptions
- Anchor to attributesattributesattributesRecord<string, string>Record<string, string>
Construct a type with a set of properties K of type T
- Anchor to ininin'head' | 'body''head' | 'body'
- Anchor to modulemodulemodulebooleanboolean
LoadScriptOptions
- attributes
Construct a type with a set of properties K of type T
Record<string, string> - in
'head' | 'body' - module
boolean
Was this page helpful?