From the course: Microsoft Office Add-Ins for Developers

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

An example in React

An example in React

From the course: Microsoft Office Add-Ins for Developers

Start my 1-month free trial

An example in React

- [Instructor] So I'm back to buy add-ins directory and I'm going to run yo office again, and this time, I'm going to choose the React framework. Let's call this one demo4react and I'm going to choose Word again, and as before, it very quickly scaffolds out the project, and then uses NPM Install to get all the dependencies. And now I can go into the directory that we just created, four, and I will start up Visual Studio Code. So now I can start up Visual Studio Code in this directory, and we can see what we have. So as usual, we have a manifest file, nothing really changes here, and then in this source directory, this is where we start with our application. In this case it's called index.tsx, and I'm just looking down here for Office initialize on line 27, and that's going to call this method render and pass it a parameter called App. Let's look at the render method. That starts on line 17 here and it's being passed a component which will be App, and then we have this React Dom.render…

Contents