Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions next/camera-snapshot/src/components/camera-snapshot.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Head from 'next/head';
import { useEffect, useRef, useState, CSSProperties } from 'react';
import { useEffect, useLayoutEffect, useRef, useState, CSSProperties } from 'react';
import {
EventActions,
defineComponents,
Expand Down Expand Up @@ -60,7 +60,7 @@ export default function CameraSnapshot() {
}
}, []);

useEffect(() => {
useLayoutEffect(() => {
const elementRefCurrent = elementRef.current;

if (!elementRefCurrent) return;
Expand Down
4 changes: 2 additions & 2 deletions next/document-reader/src/components/document-reader.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Head from 'next/head';
import { useEffect, useRef, useState, CSSProperties } from 'react';
import { useEffect, useLayoutEffect, useRef, useState, CSSProperties } from 'react';
import {
EventActions,
DocumentReaderDetailType,
Expand Down Expand Up @@ -80,7 +80,7 @@ export default function DocumentReader() {
}
}, []);

useEffect(() => {
useLayoutEffect(() => {
const elementRefCurrent = elementRef.current;

if (!elementRefCurrent) return;
Expand Down
4 changes: 2 additions & 2 deletions react-ts/camera-snapshot/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CSSProperties, useEffect, useRef, useState } from 'react';
import { CSSProperties, useEffect, useLayoutEffect, useRef, useState } from 'react';
import {
EventActions,
defineComponents,
Expand Down Expand Up @@ -59,7 +59,7 @@ function App() {
}
}, []);

useEffect(() => {
useLayoutEffect(() => {
const elementRefCurrent = elementRef.current;

if (!elementRefCurrent) return;
Expand Down
4 changes: 2 additions & 2 deletions react-ts/document-reader-device/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState, useRef, useEffect, CSSProperties } from 'react';
import { useState, useRef, useEffect, useLayoutEffect, CSSProperties } from 'react';
import {
EventActions,
defineComponents,
Expand Down Expand Up @@ -59,7 +59,7 @@ function App() {
}
}, []);

useEffect(() => {
useLayoutEffect(() => {
const elementRefCurrent = elementRef.current;

if (!elementRefCurrent) return;
Expand Down
4 changes: 2 additions & 2 deletions react-ts/document-reader/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CSSProperties, useEffect, useRef, useState } from 'react';
import { CSSProperties, useEffect, useLayoutEffect, useRef, useState } from 'react';
import {
defineComponents,
DocumentReaderService,
Expand Down Expand Up @@ -78,7 +78,7 @@ function App() {
}
}, []);

useEffect(() => {
useLayoutEffect(() => {
const elementRefCurrent = elementRef.current;

if (!elementRefCurrent) return;
Expand Down