1b11e89f4b128249613ccc351d49331d.json
1.4 KB
{"ast":null,"code":"import * as React from 'react';\nimport useForceUpdate from './useForceUpdate';\nexport default function useSyncState(initialValue) {\n var ref = React.useRef(initialValue);\n var forceUpdate = useForceUpdate();\n return [function () {\n return ref.current;\n }, function (newValue) {\n ref.current = newValue; // re-render\n\n forceUpdate();\n }];\n}","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/antd/es/_util/hooks/useSyncState.js"],"names":["React","useForceUpdate","useSyncState","initialValue","ref","useRef","forceUpdate","current","newValue"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,cAAP,MAA2B,kBAA3B;AACA,eAAe,SAASC,YAAT,CAAsBC,YAAtB,EAAoC;AACjD,MAAIC,GAAG,GAAGJ,KAAK,CAACK,MAAN,CAAaF,YAAb,CAAV;AACA,MAAIG,WAAW,GAAGL,cAAc,EAAhC;AACA,SAAO,CAAC,YAAY;AAClB,WAAOG,GAAG,CAACG,OAAX;AACD,GAFM,EAEJ,UAAUC,QAAV,EAAoB;AACrBJ,IAAAA,GAAG,CAACG,OAAJ,GAAcC,QAAd,CADqB,CACG;;AAExBF,IAAAA,WAAW;AACZ,GANM,CAAP;AAOD","sourcesContent":["import * as React from 'react';\nimport useForceUpdate from './useForceUpdate';\nexport default function useSyncState(initialValue) {\n var ref = React.useRef(initialValue);\n var forceUpdate = useForceUpdate();\n return [function () {\n return ref.current;\n }, function (newValue) {\n ref.current = newValue; // re-render\n\n forceUpdate();\n }];\n}"]},"metadata":{},"sourceType":"module"}