From 0fe65fb5b20023f4d0970b2612f95e80aab0aa1e Mon Sep 17 00:00:00 2001 From: Don Turner Date: Tue, 24 Sep 2024 18:33:58 +0100 Subject: [PATCH] Add note about only creating a presenter for supported screen types (#1681) Fixes #1639 --- docs/tutorial.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/tutorial.md b/docs/tutorial.md index 7bbbb272f..1a555fef2 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -388,7 +388,9 @@ class DetailPresenter(...) : 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. +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.