mikhael28/paretOS

Replace toasted-notes npm package

Closed this issue · 5 comments

The toasted notes package is triggering an error during build, showing that it is incompatible with React 18 - we need to replace the toasted-notes package, with a different one - hopefully one that is lighter weight. It also needs to be easy to export from a central function, like it currently is now.

When you run vite build, it will generate a document called stats.html which builds an npm module graph using the Rollup plugin visualizer, which shows you how big the npm package in question is. You can also use bundle phobia (google it) to compare different package's bundle sizes.

@mikhael28 It should also be a toast package capable of consuming context! (I think most are at this point, but, just something to look out for.)

Have you considered using MUI Snackbar as a replacement?

I have not! Though, that seems like a good move - consolidating more of the UI into Mui is probably a good move. Will be excited to unlock React 18 once this is done!

I think I’ll knock this out real quickly in the morning - I’ve been using MUI Snackbar a ton on another project and it’s very straightforward. I’ll probably just tack it on to the PR removing unused dependencies.

We can always add a new toast package back in later if desired, but it should be pretty easy to quickly nuke toasted-notes in favor of MUI Snackbar.

Sounds great @jayeclark !

Closing this! Great work @jayeclark