Skip to content

Commit

Permalink
Add note about only creating a presenter for supported screen types (#…
Browse files Browse the repository at this point in the history
…1681)

Fixes #1639
  • Loading branch information
dturner authored Sep 24, 2024
1 parent 32eaef1 commit 0fe65fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,9 @@ class DetailPresenter(...) : Presenter<DetailScreen.State> {
}
```

Here we have access to the screen and dynamically create the presenter we need. It can then pass the screen on to the presenter.
Here we have access to the screen and dynamically create the presenter we need. It can then pass the screen on to the presenter.

Note: Circuit assumes that the `create` method will only return presenter instances for screen types it supports. If the screen type isn't supported, it's important to return `null` instead.

We can then wire these detail components to our `Circuit` instance too.

Expand Down

0 comments on commit 0fe65fb

Please sign in to comment.