persisting_state_of_components.md: Remove getInstance() from code snippets

It is a part of Services topic and is redundant noise on this page. Also, getInstance() helper is not required.
This commit is contained in:
Karol Lewandowski 2023-10-10 11:17:56 +02:00
parent b4edb4a2a7
commit 20aef24c84

View File

@ -34,10 +34,6 @@ In the former case, the state class instance is typically stored as a field in t
@State(...)
class MyService implements PersistentStateComponent<MyService.State> {
public static MyService getInstance() {
// implementation according to Application/Project level service
}
static class State {
public String value;
}
@ -60,10 +56,6 @@ In the latter case, you can use the following pattern to implement `getState()`
@State(...)
class MyService implements PersistentStateComponent<MyService> {
public static MyService getInstance() {
// implementation according to Application/Project level service
}
public String stateValue;
public MyService getState() {