getState = () => {
    const savedState = localStorage.getItem(DEMO_ITEM_NAME);

    if (savedState) {
        try {
            return JSON.parse(savedState);
        } catch (e) {
            //invalid state
        }
    }

    return deepCopy(defaultState);
}
Get current state
@returns {typeof defaultState} State