Is it possible to use Singleton with Tippy in a React .map function? If so, how?

I have a React component created that shows a row of buttons, which are generated by using a .map function to create them all from a passed-in array. I have set up a Tippy tooltip for each button using the NPM package @@tippyjs/react, and they all work correctly individually. I am now trying to implement the Singleton functionality so the transition is smooth between the tooltips for each button in the row.

The NPM page for @tippyjs/react (https://github.com/atomiks/tippyjs-react?tab=readme-ov-file) states to do the following:

import Tippy, {useSingleton} from '@tippyjs/react';

function App() {
  const [source, target] = useSingleton();

  return (
    <>
      {/* This is the tippy that gets used as the singleton */}
      <Tippy singleton={source} delay={500} />

      {/* These become "virtual" */}
      <Tippy content="Hello" singleton={target}>
        <button>Reference</button>
      </Tippy>
      <Tippy content="Bye" singleton={target}>
        <button>Reference</button>
      </Tippy>
    </>
  );
}

I have my code set up as follows:

import Tippy, {useSingleton} from '@tippyjs/react';

export default function TrackedShow({...}){
    const [source, target] = useSingleton();
    return(
        <>
            ...
                <div className='tracked-show-season-episodes-container'>
                    <Tippy singleton={source} delay={50}/>
                    {trackedShowSeason.episodeObjectIds.map((episode, episodeIndex)=>{
                        return(
                            <form className='tracked-show-season-episode-container' id={`episode-${episode._id}`} key={`episode-${episode._id}`} onSubmit={handleToggleEpisodeWatched}>
                                <Tippy
                                    singleton={target}
                                    theme={'tippy-theme'}
                                    animation={'scale'}
                                    plugins={[followCursor, animateFill, sticky]}
                                    followCursor={'vertical'}
                                    sticky={true}
                                    placement={'bottom'}
                                    hideOnClick={false}
                                    content=
                                        {hoveredEpisodeTile && (hoveredEpisodeTile===episode._id) &&
                                            <div className='tippy-content'>
                                                <p className='tippy-title'>Episode Title:</p>
                                                <p className='tippy-episode-title'>"{episode.episodeTitle}"</p>
                                            </div>
                                        }
                                >
                                    <button
                                        className={'tracked-show-season-episode-button '+((watchedEpisodes.includes(episode._id)) ? 'watched' : 'unwatched')}
                                        type='submit' value={episode._id}
                                        onMouseOver={handleEpisodeTileMouseOver}
                                        onMouseOut={handleEpisodeTileMouseOut}>
                                        {episode.episodeNumber ? `Episode ${episode.episodeNumber}` : 'Special'}
                                    </button>
                                </Tippy>

                            </form>
                        )
                    })}
                </div>
            ...
        </>
    );

I am at a loss for how to correctly implement Singleton in this case, if it’s even possible, because I can’t find an example online of Singleton being used within a .map function. The @tippyjs/react docs I pasted above show Singleton being used on hard-coded buttons. This is not possible in my case because the buttons are generated dynamically when a user loads a page.

Is there any way to use Singleton within a .map function? It doesn’t seem to work regardless of where I place the <Tippy singleton={source} delay={50}/> element, and I can’t think of a way to cause the .map function to generate a <Tippy singleton={source} delay={50}/> element before generating all the buttons based on the array passed into it.


Note: Please, if you’re going to downvote my question, please at least leave a comment as to why. Is my question poorly written? Do you just not like my username? Are you simply feeling grumpy today? I’ve had issues in the past with people downvoting my seemingly well-written questions with no explanation, so I have decided to start adding this request. Since then, I have not gotten any baseless downvotes! I am here to learn, and downvoting my question without telling me why does not help me to learn. Thank you for understanding! 🙂

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật