Skip to content

Commit

Permalink
Update MIGRATION_GUIDE.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ab1470 authored Sep 19, 2024
1 parent 2c14541 commit 137b4a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The old case PascalCase names are currently still in place and have the same fun

This update is non-breaking for most use-cases, but any consumers who are `switch`ing over the `Event.EventName` enum will need to make minor changes. There are two scenarios that will require different changes:

1. If the existing `switch` statement does not include a `default` case, the compiler will throw a "Switch must be exhaustive" error. You may click "Fix" to have Xcode automatically add the missing cases, but we recommend that you add the new camelCase names alongside the old ones in your branching logic. For example:
1. If the existing `switch` statement does not include a `default` case, the compiler will throw a "Switch must be exhaustive" error. You may click "Fix" to have Xcode automatically add the missing cases, but we recommend that you add the new camelCase names alongside the old ones in your branching logic. For example:

```swift
switch event {
Expand All @@ -29,7 +29,7 @@ This update is non-breaking for most use-cases, but any consumers who are `switc
}
```

2. If the existing `switch` statement does include a `default` case, any logic touching the new camelCase names will be branched into the `default` case unless the `switch` statement is updated. We recommend updating the `switch` statement as described in (1) above to address this situation.
2. If the existing `switch` statement does include a `default` case, any logic touching the new camelCase names will be branched into the `default` case unless the `switch` statement is updated. We recommend updating the `switch` statement as described in (1) above to address this situation.

## Migrating to v3.0.0

Expand Down

0 comments on commit 137b4a8

Please sign in to comment.