SharePoint Framework: How to build a client-side web part with TypeScript and React.

SharePoint Framework and client-side development is the future for us SharePoint developers. The web parts we used to implement with C# og VB code are in future going to be made with TypeScript and compiled to JavaScript.

This session is a deep code session on how I built a SharePoint feed web part with TypeScript, Office UI Fabric and how to use React to implement the web part UI.

React is Facebook’s JavaScript library for creating user interfaces and naturally, I decided to make a SharePoint “Facebook”, a feed web part that is based on a SharePoint feed.

I’ll start with SharePoint social REST API that allows us to get existing posts and create new posts, like, and follow people. Next in line is the Property Pane and SharePoint lists REST API that allows us to get and write data to SharePoint lists. I’ll show how to get lists and show them in a dropdown in the Property Pane for the web part.

With data and properties in place, we are half way done with the web part. I’ll show how to build a Store and work with React-TSX that allows us to do interactive user interfaces.

The final part is the Office UI Fabric, the icons and controls that are used to implement SharePoint and Office 365 look and feel.

 

Share this on...