'how to use bootstrap 5 popover in reactjs components

I have seen many videos where people activate bootstrap 5 popovers using

var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'))
var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
  return new bootstrap.Popover(popoverTriggerEl)
})

in just HTML file. I haven't found any blogs or videos where people activate the popover in reactjs files. Please suggest me some examples..I am really stuck in my given task because of this popover. please someone suggest me a good example.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source