Context
Python 3.13.5
Bug
When a layout hook is enabled, persistence doesn't function. The values are saved to the browser, but they're not used upon refresh.
Expected behavior
Upon reloading the page the input value is persisted, so it has the same value as before reloading.
Screenshots

from dash import hooks, dcc, html, callback, Input, Output, Dash
app = Dash()
app.layout = html.Div([
dcc.Input(
id='input-number',
persistence=True, persistence_type='local'
),
html.Div(id='output-div')
])
@callback(
Output('output-div', 'children'),
Input('input-number', 'value')
)
def update_output(value):
return f'The input is {value}'
# Comment out to "fix" persistence
@hooks.layout()
def update_layout(layout):
return [html.Div("New layout content"), layout]
# Comment out to "fix" persistence
if __name__ == '__main__':
app.run(debug=True)
Context
Python 3.13.5
Bug
When a layout hook is enabled, persistence doesn't function. The values are saved to the browser, but they're not used upon refresh.
Expected behavior
Upon reloading the page the input value is persisted, so it has the same value as before reloading.
Screenshots