问题
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