Page MenuHomePhorge

D3680.1768765103.diff
No OneTemporary

Size
394 B
Referenced Files
None
Subscribers
None

D3680.1768765103.diff

diff --git a/lib/hooks/isomorphic-layout-effect.react.js b/lib/hooks/isomorphic-layout-effect.react.js
new file mode 100644
--- /dev/null
+++ b/lib/hooks/isomorphic-layout-effect.react.js
@@ -0,0 +1,6 @@
+// @flow
+
+import * as React from 'react';
+
+export const useIsomorphicLayoutEffect: typeof React.useEffect =
+ typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;

File Metadata

Mime Type
text/plain
Expires
Sun, Jan 18, 7:38 PM (18 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5952829
Default Alt Text
D3680.1768765103.diff (394 B)

Event Timeline