italia / italia/design-react-kit

Compatibilità con React 19

Open
#1,246 0 comments 0 reactions 1 assignee Claimed by @astagi View on GitHub
bug
Dominant language
TypeScript
Stars
179
Forks
89
PR merge metrics
No merged PRs in 30d

Description

### Esiste già una discussione sul tema che ti interessa, o su un tema simile?

- [x] Ho verificato e non esiste

### Versione della libreria

5.10.0

### Cosa

Attualmente la libreria non è compatibile con React 19 per via della dipendenza `react-toastify`. La versione attualmente usata di toastify non è compatibile con React 19 perché prova ad importare la funzione `render` da `ReactDOM`, che non è più disponibile.

Per riprodurlo basta creare un'app con React 19 (io sto usando react-router v7.14.0), installare questo kit e poi inserire `import { NotificationManager } from 'design-react-kit';` in un componente.

### Perché

Le versioni più recenti di `react-toastify` sono compatibili con React 19, aggiornare sarebbe una soluzione, ma ci sono breaking change da valutare.

Un workaround che sto adottando al momento è il seguente:

```
const NotificationManager = lazy(() =>
import('design-react-kit').then((m) => ({ default: m.NotificationManager })),
)
```

### Contesto

_No response_

### Altro

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.