---
# System prepended metadata

title: Untitled

---


```json
// upgrades.json (or package.json?)
{
  name: '@fluentui/react',
  upgrades: [
    {
      name: 'Redirect PrimaryButton imports to compat/Button'
      type: 'import-redirect',
      options: {
        from: {
          importName: "PrimaryButton",
          paths: [
            'office-ui-fabric-react'
            'office-ui-fabric-react/lib/Button'
          ] 
        },
        to: {
          path: '@fluentui/react/compat'
        }
        
      }
    },
    {
      name: 'Rename prop A to B for compoent X',
      type: 'rename-import',
      options: {
        from: {
          name: 'Pivot',
          paths: []
        },
        to: {
          name: '',
          path: ''
        }
        
      }
    },
    {
      name: 'Rename prop A to B for compoent X',
      type: 'custom-mod',
      options: {
        script: './customThing.js'
      }
    }
  ]
}
```

npm install @fluentui/react

This package and/or one its dependencies supports upgrade scripts; when you update the package, you'll be notified if an upgrade is available, and what to do.

To opt in run `npx init-upgrades` to enable tracking upgrades. This will add entries in your `package.json` to track last upgrade versions.


After they've run init-upgrades:
```
package.json
{
  upgradeVersions: {
    "@fluentui/react-button": 0
  }
}
```

Post install reads package.json upgradeVersions and checks if any updates are available. If so, reads out a message:

N updates available for `@fluentui/react-button`

To apply updates, run `npmx apply-upgrades`.

### Alternative

```typescript=
addCodeMod(renameProps, propName, renamed, path, jsxname, transform)
.addCodeMod()
.addCodeMod();

addCodeModRun(renameProps, propName, renamed, differentpath, jsxname, transform);

```
