Skip to content
This repository was archived by the owner on Feb 18, 2023. It is now read-only.

Commit 3d6507e

Browse files
committed
move useLayoutEffect to useEffect
1 parent 54b8e2e commit 3d6507e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sentry-react-lazy",
3-
"version": "0.1.3",
3+
"version": "0.1.4",
44
"description": "Load sentry monitoring system lazily on react appications",
55
"main": "dist/index.cjs.js",
66
"module": "dist/index.esm.js",

src/SentryProvider.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createContext, useContext, useLayoutEffect, useState } from 'react'
1+
import { createContext, useContext, useEffect, useState } from 'react'
22
import { SentryType, ContextProps } from './types'
33

44
declare global {
@@ -68,7 +68,7 @@ export function SentryProvider({
6868
Scope: undefined
6969
})
7070

71-
useLayoutEffect(() => {
71+
useEffect(() => {
7272
const script: HTMLScriptElement = document.createElement('script')
7373
script.src = url
7474
script.crossOrigin = 'anonymous'

0 commit comments

Comments
 (0)