React or Angular for SharePoint Framework Dev?

You prefer React. Or maybe you love Angular. But which should you use for SharePoint Framework development? Fortunately, both are supported! In this post you will learn the strengths and weaknesses of each.

Any Framework or Library is Welcome​ in SPFx Development

In SharePoint Framework development, you can use your favorite client-side framework or library. Anything that runs in a browser can be added to a SPFx project.

Although you can use any client-side development framework or library, in this post I will discuss the strengths and weaknesses of Angular and React.

Why use Angular?

  • You already know and love Angular​
  • Your team/department/company uses Angular
  • You want to use the built in support for state management, routing, and data fetching.
  • You love the power of two-way binding

Why you might NOT want to use Angular?

  • Tepid Microsoft backing​
  • More difficult initial project setup​

Why use React?​

  • You already know and love React​
  • Yeoman generator support​
  • Easier to learn than Angular?​
  • React already loaded on all modern SP Pages​
  • Office UI Fabric​
  • Lots of sample code from MSFT​

Why NOT use React?​

One-way binding​

  • Not a robust as Angular​
  • Only responsible for the ‘view’ portion of your app. There are libraries to handle things like state management, data fetching, and routing.
  • One-way binding, you have to update the model when the view changes

Another reason you may not want to use React is because of JSX, which combines your markup and your code. For example, this code shows how JavaScript is part of your markup. In fact, your markup is JavaScript.


So, which should you use, Angular or React?

I love both – so for me it depends on what I am trying to do.

Go to a slideshare of a presentation I gave at a Microsoft Conference on this topic.

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close