Reactjs 添加到React progressive web app的主屏幕

Reactjs 添加到React progressive web app的主屏幕,reactjs,redux,progressive-web-apps,Reactjs,Redux,Progressive Web Apps,我正在尝试我正在构建的主要是桌面使用,我想知道如何使用React实现这一点 我阅读了使用“添加到主屏幕”的标准: Meets a user engagement heuristic (currently, the user has interacted with the domain for at least 30 seconds) 但是,我为beforestinstallprompt事件放入事件处理程序中的console.log可能在加载应用程序后最多5秒被触发,因此我想知道如何应用此启发式

我正在尝试我正在构建的主要是桌面使用,我想知道如何使用React实现这一点

我阅读了使用“添加到主屏幕”的标准:

Meets a user engagement heuristic (currently, the user has interacted with the domain for at least 30 seconds)

但是,我为
beforestinstallprompt
事件放入事件处理程序中的console.log可能在加载应用程序后最多5秒被触发,因此我想知道如何应用此启发式方法并控制它,因为该建议只让我保存一个事件供以后使用。如果这样的事情不存在,我必须按照网站建议的方式手动保存和使用事件,我想知道我是否已经在使用Redux,这是否是存储此延迟提示事件的最佳位置。谢谢

你找到解决办法了吗?