useState
but the value will be kept between command runs.key
is the unique identifier of the state. This can be used to share the state across components and/or commands (hooks using the same key will share the same state, eg. updating one will update the others).initialState
is the initial value of the state if there aren't any in the Cache yet.config.cacheNamespace
is a string that can be used to namespace the key.