How to properly handle multiple taskpanes in office-react-addin?

こ雲淡風輕ζ 提交于 2020-01-16 08:06:09

问题


I want to create a taskpane-react project with multiple taskpanes. I have one taskpane.html as entry point:

//...
<body class="ms-font-m ms-Fabric">
  <div id="container"></div>
</body>
//...

And one index.js where App-component get rendered.

//...
Office.initialize = () => { render(App); }
//...

In App.jsx I want to decide if Taskpane1 or Taskpane2 should be rendered. But how can I make this decision? I don't want to use window.location.href.

My app was generated with Yeoman generator for Office Add-ins.

来源:https://stackoverflow.com/questions/59393819/how-to-properly-handle-multiple-taskpanes-in-office-react-addin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!