Skip to content

Releases: atomicojs/hooks

Fix ts spread types

22 May 04:35
Compare
Choose a tag to compare
3.42.2

fix ts spread types

Fixes the time to observe the resizing of references

19 May 16:53
Compare
Choose a tag to compare
3.42.1

fixes the time to observe the resizing of references

Add third parameter for useRefValues

19 May 16:51
Compare
Choose a tag to compare

this parameter moves the effect from the useLayoutEffect cycle to the useEffect cycle.

Example

useRefValues(ref,()=>{
// I run in the useEffect cycle
},true);

add the useRefIntersectionObserver hook

improve the useResponsiveState and useResizeState api

19 May 02:27
Compare
Choose a tag to compare

template string mode

useResponsiveState

this hook watches the media query

const value = useResponsiveState`
    default value,
    ${768} 768px
    ${1080} 1080px
`;

useResizeState

this hook observes the width of the webcomponent

const value = useResizeState`
    default value,
    ${768} 768px
    ${1080} 1080px
`;

3.39.0

15 May 04:11
Compare
Choose a tag to compare

Changes

  1. Update the version of Atomico : "atomico": "^1.58.0", avoid updating no you are not working with a version equal to or greater than the commented one.
  2. add hook useRefValue https://atomico.gitbook.io/doc/atomico/atomico-hooks/use-ref-values

Add modes for useDebounceState

09 May 05:53
Compare
Choose a tag to compare

useDebounceState

Example mode timeout

default mode based on setTimeout

const ms = 100;
const initialState = {};
useDebounceState( ms , initialState,);

Example mode fps

mode based on requestAnimationFrame

const fps = 1;
const initialState = {};
useDebounceState( fps , initialState, "fps");

Example mode idle

mode based on requestIdleCallback

const timeout = 1;
const initialState = {};
useDebounceState( timeout, initialState, "idle");

Use render now check if it is in ssr mode

08 May 21:56
Compare
Choose a tag to compare

this does not break the above code, but if you want to disable useRender in ssr mode, you must have a version of Atomico greater than or equal to 1.56.0

Fix peerDependencies of subpackages

08 May 21:08
Compare
Choose a tag to compare
3.36.2

fix peerDependencies of subpackages

Fix the import of the sub package.json

08 May 20:33
Compare
Choose a tag to compare
3.36.1

fix the import of the subpackage.json