how to do StateEffect.appendConfig

What is the correct way to execute StateEffect.appendConfig. Currently I do
EditorView.dispatch({effects: [StateEffect.appendConfig.of([some_state_field])],});
Is this the right way to do this? The problem I have with this is that each time this is executed, every other state field will be triggered and the extensions depend on them will be recalculated too.

Yes, that’s how you add an extension.