Skip to content

Commit

Permalink
update migration and best practices upgrade advice
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinVandy committed Oct 28, 2023
1 parent a10dc49 commit 679e497
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ import Head from 'next/head';

Here are some best practices to follow when using Material React Table. We'll cover Type-Safety (even if you are not using TypeScript) and how to best create re-usable MRT components.

### Stay Up-To-Date

Run this command in your terminal every few weeks to make sure you are using the latest version of Material React Table and MUI

```bash
npx npm-check-updates -u material-react-table @mui/material @mui/x-date-pickers @mui/icons-material @emotion/react @emotion/styled
```

### Type-Safety

TanStack Table itself is written in TypeScript, and Material React Table builds on top of its great type definitions for a best-in-class TypeScript experience.
Expand Down
4 changes: 3 additions & 1 deletion apps/material-react-table-docs/pages/migrating-to-v2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ See the full [changelog](/changelog#version-2.0.0---10-27-2023) for more details

### Upgrade Dependencies

Run this command to set the `material-react-table` dependency to the latest version in your `package.json`. This will not perform the full install yet.

```bash
npx npm-check-updates -u material-react-table
```

Your `package.json` should have `"material-react-table": "^2.x.x"` as a dependency.

Then run the install command again.
Then run the install command again. Either `npm i`, `pnpm i`, or `yarn`, etc. Or run the full command below to make sure all MUI dependencies are also upgraded or installed.

<InstallCommand />

Expand Down

2 comments on commit 679e497

@vercel
Copy link

@vercel vercel bot commented on 679e497 Oct 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 679e497 Oct 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.