Closed fathorMB closed 2 years ago
I am waiting for this as well.
I have the same issue. I'm making an excel plug-in that creates a custom ribbon with a group inside that contains two task pane buttons, I would like to use the same html file by changing the content, so I would like to define a routing via react-router-dom
The templates provided give a basic idea of how to integrate with Office.js and provide a way to test things out locally with Office. We don't have a way to provide guidance for all the different features of many different frameworks. Stack Overflow is a good place to get community help in figuring these things out.
It looks like someone else was able to make it work (https://github.com/OfficeDev/office-js/issues/2108) using HashRouter, but they were looking specifically at the ie webview.
Note there are 3 different webviews used by different versions of office so consider which ones you intend to support when figuring out how to write you add-in.
https://docs.microsoft.com/en-us/office/dev/add-ins/concepts/browsers-used-by-office-web-add-ins
do we have a possibility to get a working sample , which can demonstrate the working of react router working with a excel addin, i could not find a link to working example but the thread is closed.
Based on this SO thread, there seems to be some kind of ambiguity in React router usage when developing Office Add-ins. SO Answer
Can you please provide a sample with an effective way to achieve React routing? One of the advised solutions seems to be using HashRouter instead of Router, but in my case nothing changes. It is also hard to identify the problem because no error is logged, simply the Add in does nothing.