ID not found in layout error

Hi,

I am trying to make a dash app where I use a function in the initial layout. As I am unable to share the exact code, I will call this function x. Function x has an argument called data_for_function. In the frontend I have:

dbc.Row(x(data_for_function=dcc.Store(id=‘data-store’,data=data), app=app))

In my callback function I output to ('data-store’,‘data’). However, I get the error ‘ID not found in layout’. I have already tried to do suppress_callback_exceptions=True, but it does not resolve the error. I also can’t output to the children of dbc.Row() for other reasons. Any help would be greatly appreciated!