Trying to update the style of boostrap component yields React error message

I have a simple callback which should return display none for a boostrap container. I.e im trying to render that entire container (including rows and cols inside) invisible

@app.callback(
    ServersideOutput('bootstrap-container', 'style'),
    Input...
def do_something(var):
    if condition...
        return {'display':'none'}

And i’m getting a React error message while inspecting on chrome:

The style prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + ‘em’}} when using JSX.

Any ideas why this might be an issue?

Hi @Kapla

Unless this is just a copy/paste error in the posted code, It looks like you are missing a '

return {'display':'none}

should be

return {'display':'none'}

Sorry that’s my bad. it was a typo on the post but not the code.
Seems like the issue might because of the Serversideoutput from the dash_extensions.enrich module.
Because when I change from Serversideoutput to Output, it works fine.