# Upgrade guide for Scheduler v5.0.0

## horizontalEventSorterFn() renamed to overlappingEventSorter()

Renamed since the old name was misleading, the function is called to sort overlapping events vertically. The
functionality remains the same, only the name changed. If you are using it, you should rename the usages in your code:

**Old code:**
```javascript
const scheduler = new Scheduler({
    horizontalEventSorterFn(a, b) {
        // Your custom logic here
    }
})
```

**New code:**

```javascript
const scheduler = new Scheduler({
    overlappingEventSorter(a, b) {
        // Your custom logic here
    }
})
```

## React wrappers now use module bundle

The React wrappers previously used the UMD bundle to import required classes:

**Old code:**
```javascript
import { EventModel } from '@bryntum/scheduler/scheduler.umd.js';
```

UMD bundle is not used anymore in the wrappers so the import line in the above code needs to be changed:

**New code:**
```javascript
import { EventModel } from '@bryntum/scheduler';
```

Imports from `@bryntum/scheduler-react` remain same.


<p class="last-modified">Last modified on 2023-10-26 8:19:20</p>