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?
- 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
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.
About the Author
Darin Dickey is Principal Software Engineer at the LDS Church. He has over 17 years experience in Software Development. Before moving to Utah in 2011, Darin, his wife, and their children spent 12 years in Philadelphia, PA. He also claims to be a ‘slightly better than average’ Ultimate Frisbee player.