Releases: atomicojs/hooks
@atomico/[email protected]
@atomico/[email protected]
Add a second parameter to useRouter with the intention of regenerating the hook's return.
@atomico/[email protected]
@atomico/[email protected]
Now this hook is simpler, it only exposes the following utilities as a module:
- useRouter: hook for routing
- redirect: callback for redirecting
- getPath: callback for getting the path from useRouter
Example of useRouter
const { id, result, path, params, redirect } = useRouter<string>({
"/": () => "home",
"/config": () => "config",
});
- id: path from location.
- result: return of the callback.
- params: parameters of the callback.
- redirect: equivalent to redirect from the module.
@atomico/[email protected]
In this version, the useRefValues hook is removed in favor of Atomico's core hook useRefEffect, as it serves the same purpose. This has required updating packages that depended on this hook at the monorepo level.
Fix: MIT OSS license added
v4.1.2 MIT license is added
fix useRefMutationObserver when using references without current
v4.1.1 fix useRefMutationObserver when using references without current
Support from [email protected]
Warning
only compatible with versions equal to or greater than [email protected]
@atomico/use-mutation-observer
useMutationObserver
no necesita referencia y observa el host.useRefMutationObserver
permite asociar una referencia.
@atomico/use-child-nodes
Es agregado, pero ahora este por defecto observa los niños con useMutationObserver
@atomico/use-disabled
Actualiza al formato actual de @atomico/use-mutation-observer
@atomico/use-render
Simplifica su codigo.
@atomico/use-parent
Permite capturar por string e instancias.
fix useSlot version
v4.0.1 fix useSlot version
🚀 Say hello to @atomico/hooks@4, Improvements for better maintenance.
Maintenance improvement
starting from version 4, @atomico/hooks will be managed as a monorepo. This is done with the aim of:
- Improving the consumption of these hooks, allowing developers to select the version of the hook to use in their project.
- Including new hooks more quickly, as they won't break the usage of the @atomico/hooks package by default. Developers can roll back or update on a per-hook basis rather than for all hooks.
This version breaks some hooks from version 3, such as:
Removed Hooks
- use-async-effect: Prefer using Atomico's asynchronous API.
- use-channel: Prefer the core of Atomico, which already has APIs for working with contexts.
- use-child-nodes: Prefer the useSlot hook, as use-child-node is inaccurate if multiple renders occur on the same web component.
- use-controller: Prefer Atomico's hooks API (can be reintegrated upon community request; feel free to request it via issue).
- use-css: Prefer Atomico's core API for handling CSS.
- use-dollars: Prefer the approach of using slots as templates.
- use-queue-task: Unused (can be reintegrated upon community request; feel free to request it via issue).
- use-unique-id-selector: Prefer useId from the core of Atomico.
- use-script: Prefer using Atomico's asynchronous API.
Renamed Hooks
- use-history = use-value-history: Facilitates understanding of cumulative values between renders.
Message from the author @UpperCod
We'll be attentive to your experience with this new version of Atomico and @atomico/hooks. If you have any feedback or questions, feel free to share them. Happy coding!
Fix default export and use-router types
Issue: #13
This version fixes the use of @atomico/hooks in webpack