success method via context. Users can pass in any components as the first param of the success method to be displayed inside a toast. ToastBody as the first param, which will contain a close button. The close button will close the toast via onClose method exposed in the context.context=... prints out correctly the value of the context that the ToastBody is wrapped in.undefinedToastBody is created much after the ToastContext.Provider is created, so it cannot set the correct owner. What do you think?