From 3e201fbac3cc56bb2576f32b2d9d38b2965fba0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Tue, 12 Oct 2021 15:08:15 +0200 Subject: [PATCH] persisting_state_of_components.md: add dummy getInstance() method to code sample for clarification, #2 --- topics/basics/persisting_state_of_components.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/topics/basics/persisting_state_of_components.md b/topics/basics/persisting_state_of_components.md index 8a96b0fde..711f255fb 100644 --- a/topics/basics/persisting_state_of_components.md +++ b/topics/basics/persisting_state_of_components.md @@ -67,6 +67,11 @@ In the latter case, you can use the following pattern to implement `getState()` ```java @State(...) class MyService implements PersistentStateComponent { + + public static MyService getInstance() { + // implementation according to Application/Project level service + } + public String stateValue; public MyService getState() {