All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.cjs.react-utils.usePrevious.usePrevious.js.map Maven / Gradle / Ivy

Go to download

A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.

There is a newer version: 4.12.3
Show newest version
{"version":3,"file":"usePrevious.js","names":["_react","require","usePrevious","value","ref","useRef","useEffect","current","_default","exports"],"sources":["../../../../src/react-utils/usePrevious/usePrevious.js"],"sourcesContent":["import { useEffect, useRef } from \"react\";\n\nconst usePrevious = value => {\n  const ref = useRef(value);\n\n  useEffect(() => {\n    ref.current = value;\n  }, [value]);\n\n  return ref.current;\n};\n\nexport default usePrevious;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAMC,WAAW,GAAG,SAAdA,WAAWA,CAAGC,KAAK,EAAI;EAC3B,IAAMC,GAAG,GAAG,IAAAC,aAAM,EAACF,KAAK,CAAC;EAEzB,IAAAG,gBAAS,EAAC,YAAM;IACdF,GAAG,CAACG,OAAO,GAAGJ,KAAK;EACrB,CAAC,EAAE,CAACA,KAAK,CAAC,CAAC;EAEX,OAAOC,GAAG,CAACG,OAAO;AACpB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEaP,WAAW","ignoreList":[]}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy