Saltearse al contenido

Migración a v3

  1. Link y navigate ahora son estrictos para rutas internas.
  2. Se agregaron useLocation y useParams.
  3. navigate acepta opciones { replace, state }.
  4. RouterProvider agrega basename y notFound.
  5. Se introducen subpaths (core, protected).

Antes:

<Link to="https://externo.com">Externo</Link>

Ahora:

<a href="https://externo.com" target="_blank" rel="noopener noreferrer">Externo</a>

Antes:

import { RouterProvider, Link, useNavigate, Protected } from '@arielgonzaguer/michi-router';

Ahora:

import { RouterProvider, Link, useNavigate } from '@arielgonzaguer/michi-router/core';
import { Protected } from '@arielgonzaguer/michi-router/protected';
<RouterProvider routes={routes} notFound={<NotFound />} />
  • No hay Link con URLs externas.
  • Protected.redirectionPath es interna.
  • Las rutas dinámicas usan :param.
  • Los imports usan core/protected cuando aplica.