gloriasoft / veaury

Use React in Vue3 and Vue3 in React, And as perfect as possible!
MIT License
1.31k stars 83 forks source link

在vue使用react组件, 传参响应很慢 #66

Closed xinre closed 1 year ago

xinre commented 1 year ago

useEffect(() => { updateTabsBounds(false); containerRef.current.scrollLeft = containerRef.current.scrollWidth; window.addEventListener('resize', onResize); window.observerTab = (config) => { console.log(config, "configconfigconfig"); const findIndex = list.findIndex((element) => element.id === config.name); if (findIndex === -1) { list.push(new ITab({ active: true, pinned: null, favicon: config.favicon, title: config.pluginName, closable: true, content: config }, config.name)); setList(list.concat([])); } setSelectKey(config.name) } }, [list])

observerTab在vue中调用 config 返回的很慢

xinre commented 1 year ago

还有在react组件中获取vue那边传过来的函数中的参数的时候也会卡一会才有值进来, 请问这个应该怎么处理啊,

devilwjp commented 1 year ago

@xinre 提供完整的复现问题的例子给我吧,我来复现一下 比如创建一个github的复现问题的项目,我来fork一下看看

xinre commented 1 year ago

抱歉, 我解决了, 应该是我这边的问题。 当时只是打印慢了一点。