Black Lives Matter. Please consider donating to Black Girls Code today.

Got duplicate callback output after refreshing the page

I made a multi-page app and once I change my url to shift one page to another page or even when I refresh the current page, there will be a duplicate callback output error.
Besides, I encapsulated my function into a function and return the layout to my to show it, but it seems like all the callbacks are not shown when I open the url, only if I refresh the page will it update the callbacks.
I have totally no idea, is there anyone to help me with that? Thanks a lot