mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Change-Id: I066c0e7f8ce87ec00b1141a1b44430444a819b42 (cherry picked from commit 05907a1a42da82737090d55046974d401f8af057)
		
			
				
	
	
		
			9 lines
		
	
	
		
			No EOL
		
	
	
		
			289 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
		
			No EOL
		
	
	
		
			289 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
import { useEffect, useLayoutEffect } from 'react';
 | 
						|
 | 
						|
function useIsomorphicLayoutEffect(callback, deps) {
 | 
						|
  // eslint-disable-next-line
 | 
						|
  if (typeof window === 'undefined') return useEffect(callback, deps);
 | 
						|
  return useLayoutEffect(callback, deps);
 | 
						|
}
 | 
						|
 | 
						|
export { useIsomorphicLayoutEffect }; |