How does reactjs solve the problem that one of the two-tier nested components will fail?


<Popconfirm>
    <Tooltip title={ ""} disableFocusListener={true}>
        <a href="javascript:void(0)" >
            111
        </a>
    </Tooltip>
</Popconfirm>

as above, it is impossible to confirm that the pop-up box component and the tooltip prompt component work on the same a tag at the same time. Is there any other way to use these two components for the a tag at the same time? Thank you

Nov.25,2021

Popconfirm and Tooltip are implemented through event bubbling.
therefore, when these two components are wrapped at the same time, you should make some judgments based on the logic of event bubbling.
it seems that antd doesn't open up the event bubbling mechanism, so you need to reimplement it using HOC .


https://codesandbox.io/s/pm7p.
can be nested

Menu