SlideShare a Scribd company logo
1 of 25
ERIC OVERFIELD | PixelMill
Microsoft MVP & RD
SharePoint Advocate & Enthusiast
@ericoverfield
SUPERCHARGE YOUR SHAREPOINT
FRAMEWORK WEBPART WITH
REACT
http://pxml.ly/EO-SPFx-React
ERIC OVERFIELD
President & Co-Founder of PixelMill
Microsoft MVP, Office Servers & Services
Microsoft Regional Director
Published SharePoint Author
SharePoint Community Organizer & Contributor @ericoverfield
ericoverfield.com
PixelMill is a modern SharePoint Design Agency based in Northern California. On the forefront of
web design trends since 1998, PixelMill provides innovative collaboration portals to enhance the
user adoption of SharePoint intranets, extranets, and public facing sites.
PIXELMILL
@pixelmillteam
pixelmill.com
1. Introduction to React
2. Combine React with SPFx
3. Extend SPFx webparts with React
OVERVIEW
What is React?
A Framework, a Library, Just a Verb?
@ericoverfieldericoverfield.com
What is React?
• An open-source JavaScript library for creating web based user interfaces
• Created and maintained by Facebook
• Fast, declarative views, component based
• Often compared to AngularJS
• AngularJS is a framework, containing a model-view-controller
• React is a library – not as many features, not a full framework
• React has a View, but lacks Model and Controller components
• One way data flow
• Flux (Architecture): Dispatcher->Store->View->Action (back to Dispatcher)
REACT OVERVIEW
@ericoverfieldericoverfield.com
Why might React work well with SPFx?
• React is considered super-fast
• Use of “Virtual DOM”
• React only changes what has changed
• i.e. only one item in a list instead of the entire list
• A full featured framework such as AngularJS might be overkill
• SPFx provides own “model” and “controller” features, UI aspect can be more simple
• With less moving parts, many find easier to learn
• React considered by many easier to debug as only providing View
REACT AND SPFx
+
PRIMARY REACT BUILDING BLOCKS
@ericoverfieldericoverfield.com
React core – a Virtual DOM – “React DOM”
• An abstraction of the real DOM – an abstraction of an abstraction
• Real DOM tied to rendering, thus slow on updates
• React DOM used for quick diffs, control of state change
REACT DOM - VIRTUAL DOM
@ericoverfieldericoverfield.com
Base Component Building Block - ReactElement
• A stateless, plain object describing what we want to render in a browser
• Need to provide at least a type of element, tied to a rendering function
• “props” allow for the passing of properties
• var reactElement = React.createElement(type, props, children);
REACTELEMENT
@ericoverfieldericoverfield.com
Stateful React Elements -> ReactComponent
• Very similar to a ReactElement but has “state”
• “setState” used to update state of component
• Upon update of state, React will auto-rerender just what changed
• Based on class, React.component, that accepts properties and state, that we
extend
REACTCOMPENENT
@ericoverfieldericoverfield.com
JavaScript XML (.jsx) – Syntatic language for rendering templates
• Use JSX to write React Views
• Adapted by TypeScript as well (.tsx) to allow for similar coding
• Not required by React, but makes life easier
• JSX gets transpiled to JavaScript
JSX - JAVASCRIPT XML
REACT AND SPFx
@ericoverfieldericoverfield.com
React SPFx Webpart folder structure – Similar as a no-framework webpart
• src: primary webpart TypeScript source code
• src/webparts/”yourwebpart”/components: .tsx / React Components
• config: json configuration files for build process
• typings: TypeScript typings for JS libs – legacy
• lib: Build files (TS compiled JS) ready for bundle
• dist: Final web ready code for distribution
• sharepoint: .spapp file for App Catalog
• node_modules: NodeJS modules (JS) for toolchain
REACT SPFx WEBPART PROJECT
STRUCTURE
@ericoverfieldericoverfield.com
React and SPFx
• Normally somewhat complex to include React into project
• react and react-dom needed, then create scaffolding, SPFx makes much more simple
• With SPFx, need to import react and react-dom where webpart defined
• import * as React from 'react';
• import * as ReactDom from 'react-dom';
• In Webpart render() function, create React Element, and render
UTILIZE REACT IN SPFx WEBPARTS
@ericoverfieldericoverfield.com
Office UI Fabric
• A framework for building custom Office 365 / SharePoint front-end experiences
• Open source: https://github.com/OfficeDev/office-ui-fabric-core
• https://dev.office.com/fabric
• Primary pillars
• Core: Styles / CSS
• JavaScript: Interactions
• React: UI integration
• AngularJS: open source project
• SPFx pre-integrated with React
OFFICE UI FABRIC REACT AND SPFx
@ericoverfieldericoverfield.com
Why you will use Office UI Fabric
• Consistency of interface with custom components
• SharePoint Framework has UI Fabric built in
• Allows developers to focus on functionality, not the look
• Speed up the development cycle
WHY OFFICE UI FABRIC
Demo
CREATE A REACT ENABLED
SPFx WEBPART
A MORE COMPLEX REACT
SPFx WEBPART
Demo
MULTI-PAGE REACT WEBPART
Demo
EXTENDING SPFx WEBPART
PROPERTY PANE WITH REACT
Demo
REVIEW
1. Introduction to React
2. Combine React with SPFx
3. Extend SPFx webparts with React
RESOURCES
RESOURCES
• Official React Homepage
https://facebook.github.io/react/
• Office UI Fabric React
https://dev.office.com/fabric#/components
• GitHub: Office UI Fabric React
https://github.com/OfficeDev/office-ui-fabric-react
• Office UI Fabric React in a SPFx Webpart
https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/use-fabric-react-components
• SPFx Fantastic 40 Web Parts
https://github.com/OlivierCC/spfx-40-fantastics
• Even more sample React SPFx Web Parts
https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples
• React Custom Property Pane Control
https://dev.office.com/sharepoint/docs/spfx/web-parts/guidance/build-custom-property-pane-controls
• Presentation Source code
https://github.com/eoverfield/SPFx-Demos/tree/master/React-WebPart-Demos
THANK YOU
SUPERCHARGE YOUR SHAREPOINT
FRAMEWORK WEBPART WITH
REACT

More Related Content

What's hot

Broaden your dev skillset with SharePoint branding options
Broaden your dev skillset with SharePoint branding optionsBroaden your dev skillset with SharePoint branding options
Broaden your dev skillset with SharePoint branding optionsEric Overfield
 
Introduction to SharePoint Framework (SPFx)
Introduction to SharePoint Framework (SPFx)Introduction to SharePoint Framework (SPFx)
Introduction to SharePoint Framework (SPFx)Fabio Franzini
 
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...Rencore
 
ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...
ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...
ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...European Collaboration Summit
 
SPS Paris: Building great client-side web parts with spfx, pnp-js-core, React...
SPS Paris: Building great client-side web parts with spfx, pnp-js-core, React...SPS Paris: Building great client-side web parts with spfx, pnp-js-core, React...
SPS Paris: Building great client-side web parts with spfx, pnp-js-core, React...Bill Ayers
 
SharePoint Saturday Calgary 2017 - From SharePoint to Office 365 Development
SharePoint Saturday Calgary 2017 - From SharePoint to Office 365 DevelopmentSharePoint Saturday Calgary 2017 - From SharePoint to Office 365 Development
SharePoint Saturday Calgary 2017 - From SharePoint to Office 365 DevelopmentSébastien Levert
 
An Introduction to the Office 365 Patterns and Practices Project
An Introduction to the Office 365 Patterns and Practices ProjectAn Introduction to the Office 365 Patterns and Practices Project
An Introduction to the Office 365 Patterns and Practices ProjectSPC Adriatics
 
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 DevelopmentSébastien Levert
 
ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...
ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...
ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...Sébastien Levert
 
SharePoint Development with Visual Studio 2012
SharePoint Development with Visual Studio 2012SharePoint Development with Visual Studio 2012
SharePoint Development with Visual Studio 2012Thuan Ng
 
Real World SharePoint Framework and Azure Services
Real World SharePoint Framework and Azure ServicesReal World SharePoint Framework and Azure Services
Real World SharePoint Framework and Azure ServicesBrian Culver
 
SharePoint Fest Seattle 2018 - From SharePoint to Office 365 Development
SharePoint Fest Seattle 2018 - From SharePoint to Office 365 DevelopmentSharePoint Fest Seattle 2018 - From SharePoint to Office 365 Development
SharePoint Fest Seattle 2018 - From SharePoint to Office 365 DevelopmentSébastien Levert
 
What's in SharePoint land 2016 for the end user
What's in SharePoint land 2016 for the end userWhat's in SharePoint land 2016 for the end user
What's in SharePoint land 2016 for the end userSPC Adriatics
 
Branding Modern SharePoint
Branding Modern SharePointBranding Modern SharePoint
Branding Modern SharePointEric Overfield
 
Practical management of development & QA environments for SharePoint 2013
Practical management of development & QA environments for SharePoint 2013Practical management of development & QA environments for SharePoint 2013
Practical management of development & QA environments for SharePoint 2013SharePointRadi
 
SPUnite17 SPFx Extensions
SPUnite17 SPFx ExtensionsSPUnite17 SPFx Extensions
SPUnite17 SPFx ExtensionsNCCOMMS
 
Branding office 365 with front end tooling
Branding office 365 with front end toolingBranding office 365 with front end tooling
Branding office 365 with front end toolingThomas Daly
 
SharePoint Fest DC 2019 - From SharePoint to Office 365 Development
SharePoint Fest DC 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest DC 2019 - From SharePoint to Office 365 Development
SharePoint Fest DC 2019 - From SharePoint to Office 365 DevelopmentSébastien Levert
 

What's hot (20)

Broaden your dev skillset with SharePoint branding options
Broaden your dev skillset with SharePoint branding optionsBroaden your dev skillset with SharePoint branding options
Broaden your dev skillset with SharePoint branding options
 
O365: Attack of the Clones
O365: Attack of the ClonesO365: Attack of the Clones
O365: Attack of the Clones
 
Introduction to SharePoint Framework (SPFx)
Introduction to SharePoint Framework (SPFx)Introduction to SharePoint Framework (SPFx)
Introduction to SharePoint Framework (SPFx)
 
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...
Matthias Einig from Rencore - Transforming SharePoint farm solutions to the A...
 
ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...
ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...
ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...
 
SPS Paris: Building great client-side web parts with spfx, pnp-js-core, React...
SPS Paris: Building great client-side web parts with spfx, pnp-js-core, React...SPS Paris: Building great client-side web parts with spfx, pnp-js-core, React...
SPS Paris: Building great client-side web parts with spfx, pnp-js-core, React...
 
SharePoint Saturday Calgary 2017 - From SharePoint to Office 365 Development
SharePoint Saturday Calgary 2017 - From SharePoint to Office 365 DevelopmentSharePoint Saturday Calgary 2017 - From SharePoint to Office 365 Development
SharePoint Saturday Calgary 2017 - From SharePoint to Office 365 Development
 
An Introduction to the Office 365 Patterns and Practices Project
An Introduction to the Office 365 Patterns and Practices ProjectAn Introduction to the Office 365 Patterns and Practices Project
An Introduction to the Office 365 Patterns and Practices Project
 
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
 
ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...
ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...
ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...
 
SharePoint Development with Visual Studio 2012
SharePoint Development with Visual Studio 2012SharePoint Development with Visual Studio 2012
SharePoint Development with Visual Studio 2012
 
All about SPFx
All about SPFxAll about SPFx
All about SPFx
 
Real World SharePoint Framework and Azure Services
Real World SharePoint Framework and Azure ServicesReal World SharePoint Framework and Azure Services
Real World SharePoint Framework and Azure Services
 
SharePoint Fest Seattle 2018 - From SharePoint to Office 365 Development
SharePoint Fest Seattle 2018 - From SharePoint to Office 365 DevelopmentSharePoint Fest Seattle 2018 - From SharePoint to Office 365 Development
SharePoint Fest Seattle 2018 - From SharePoint to Office 365 Development
 
What's in SharePoint land 2016 for the end user
What's in SharePoint land 2016 for the end userWhat's in SharePoint land 2016 for the end user
What's in SharePoint land 2016 for the end user
 
Branding Modern SharePoint
Branding Modern SharePointBranding Modern SharePoint
Branding Modern SharePoint
 
Practical management of development & QA environments for SharePoint 2013
Practical management of development & QA environments for SharePoint 2013Practical management of development & QA environments for SharePoint 2013
Practical management of development & QA environments for SharePoint 2013
 
SPUnite17 SPFx Extensions
SPUnite17 SPFx ExtensionsSPUnite17 SPFx Extensions
SPUnite17 SPFx Extensions
 
Branding office 365 with front end tooling
Branding office 365 with front end toolingBranding office 365 with front end tooling
Branding office 365 with front end tooling
 
SharePoint Fest DC 2019 - From SharePoint to Office 365 Development
SharePoint Fest DC 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest DC 2019 - From SharePoint to Office 365 Development
SharePoint Fest DC 2019 - From SharePoint to Office 365 Development
 

Similar to Supercharge Your SharePoint Framework Webpart with React

O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialThomas Daly
 
Progressive Web Apps and React
Progressive Web Apps and ReactProgressive Web Apps and React
Progressive Web Apps and ReactMike Melusky
 
React state management with Redux and MobX
React state management with Redux and MobXReact state management with Redux and MobX
React state management with Redux and MobXDarko Kukovec
 
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...MskDotNet Community
 
Introduction to React native
Introduction to React nativeIntroduction to React native
Introduction to React nativeDhaval Barot
 
SharePoint Framework - Developer Preview
SharePoint Framework - Developer PreviewSharePoint Framework - Developer Preview
SharePoint Framework - Developer PreviewSean McLellan
 
An Overview of the React Ecosystem
An Overview of the React EcosystemAn Overview of the React Ecosystem
An Overview of the React EcosystemFITC
 
React + Flux = Joy
React + Flux = JoyReact + Flux = Joy
React + Flux = JoyJohn Need
 
React.js for Rails Developers
React.js for Rails DevelopersReact.js for Rails Developers
React.js for Rails DevelopersArkency
 
The happy developer - SharePoint Framework React and Mindfulness
The happy developer - SharePoint Framework React and MindfulnessThe happy developer - SharePoint Framework React and Mindfulness
The happy developer - SharePoint Framework React and MindfulnessOlli Jääskeläinen
 
Introduction to react native with redux
Introduction to react native with reduxIntroduction to react native with redux
Introduction to react native with reduxMike Melusky
 
An evening with React Native
An evening with React NativeAn evening with React Native
An evening with React NativeMike Melusky
 
Reactive Web Development with Spring Boot 2
Reactive Web Development with Spring Boot 2Reactive Web Development with Spring Boot 2
Reactive Web Development with Spring Boot 2Mike Melusky
 
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...Lucas Jellema
 
React for .net developers
React for .net developersReact for .net developers
React for .net developersmacsdickinson
 

Similar to Supercharge Your SharePoint Framework Webpart with React (20)

Fluxible
FluxibleFluxible
Fluxible
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material
 
Progressive Web Apps and React
Progressive Web Apps and ReactProgressive Web Apps and React
Progressive Web Apps and React
 
React state management with Redux and MobX
React state management with Redux and MobXReact state management with Redux and MobX
React state management with Redux and MobX
 
React.js at Cortex
React.js at CortexReact.js at Cortex
React.js at Cortex
 
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
 
Introduction to React native
Introduction to React nativeIntroduction to React native
Introduction to React native
 
SharePoint Framework - Developer Preview
SharePoint Framework - Developer PreviewSharePoint Framework - Developer Preview
SharePoint Framework - Developer Preview
 
React js
React jsReact js
React js
 
An Overview of the React Ecosystem
An Overview of the React EcosystemAn Overview of the React Ecosystem
An Overview of the React Ecosystem
 
React + Flux = Joy
React + Flux = JoyReact + Flux = Joy
React + Flux = Joy
 
React a11y-csun
React a11y-csunReact a11y-csun
React a11y-csun
 
React.js for Rails Developers
React.js for Rails DevelopersReact.js for Rails Developers
React.js for Rails Developers
 
The happy developer - SharePoint Framework React and Mindfulness
The happy developer - SharePoint Framework React and MindfulnessThe happy developer - SharePoint Framework React and Mindfulness
The happy developer - SharePoint Framework React and Mindfulness
 
React Tech Salon
React Tech SalonReact Tech Salon
React Tech Salon
 
Introduction to react native with redux
Introduction to react native with reduxIntroduction to react native with redux
Introduction to react native with redux
 
An evening with React Native
An evening with React NativeAn evening with React Native
An evening with React Native
 
Reactive Web Development with Spring Boot 2
Reactive Web Development with Spring Boot 2Reactive Web Development with Spring Boot 2
Reactive Web Development with Spring Boot 2
 
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
 
React for .net developers
React for .net developersReact for .net developers
React for .net developers
 

More from Eric Overfield

Microsoft Ignite 2016 In Review
Microsoft Ignite 2016 In ReviewMicrosoft Ignite 2016 In Review
Microsoft Ignite 2016 In ReviewEric Overfield
 
The Future of SharePoint - What You Need to Know
The Future of SharePoint - What You Need to KnowThe Future of SharePoint - What You Need to Know
The Future of SharePoint - What You Need to KnowEric Overfield
 
Branding SharePoint from Prototype to Deployment - Workshop
Branding SharePoint from Prototype to Deployment - WorkshopBranding SharePoint from Prototype to Deployment - Workshop
Branding SharePoint from Prototype to Deployment - WorkshopEric Overfield
 
Create your own SharePoint Master Pages and Page Layouts
Create your own SharePoint Master Pages and Page LayoutsCreate your own SharePoint Master Pages and Page Layouts
Create your own SharePoint Master Pages and Page LayoutsEric Overfield
 
Share point 2013 apps and i mean it
Share point 2013 apps and i mean itShare point 2013 apps and i mean it
Share point 2013 apps and i mean itEric Overfield
 
Your SharePoint 2013 Branding Initiation
Your SharePoint 2013 Branding InitiationYour SharePoint 2013 Branding Initiation
Your SharePoint 2013 Branding InitiationEric Overfield
 
Shape SharePoint 2013 for Mobile
Shape SharePoint 2013 for MobileShape SharePoint 2013 for Mobile
Shape SharePoint 2013 for MobileEric Overfield
 
The 2013 Design Manager - From HTML to SharePoint
The 2013 Design Manager - From HTML to SharePointThe 2013 Design Manager - From HTML to SharePoint
The 2013 Design Manager - From HTML to SharePointEric Overfield
 
The Design Dilemma of Mobile and SharePoint
The Design Dilemma of Mobile and SharePointThe Design Dilemma of Mobile and SharePoint
The Design Dilemma of Mobile and SharePointEric Overfield
 
Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365Eric Overfield
 
Enhance SharePoint 2013 with Responsive Web Design
Enhance SharePoint 2013 with Responsive Web DesignEnhance SharePoint 2013 with Responsive Web Design
Enhance SharePoint 2013 with Responsive Web DesignEric Overfield
 
Enhancing SharePoint with Responsive Web Design
Enhancing SharePoint with Responsive Web DesignEnhancing SharePoint with Responsive Web Design
Enhancing SharePoint with Responsive Web DesignEric Overfield
 
Reshaping SharePoint for Evolving Internet Devices
Reshaping SharePoint for Evolving Internet DevicesReshaping SharePoint for Evolving Internet Devices
Reshaping SharePoint for Evolving Internet DevicesEric Overfield
 
SharePoint Branding - Change Your Look
SharePoint Branding - Change Your LookSharePoint Branding - Change Your Look
SharePoint Branding - Change Your LookEric Overfield
 

More from Eric Overfield (14)

Microsoft Ignite 2016 In Review
Microsoft Ignite 2016 In ReviewMicrosoft Ignite 2016 In Review
Microsoft Ignite 2016 In Review
 
The Future of SharePoint - What You Need to Know
The Future of SharePoint - What You Need to KnowThe Future of SharePoint - What You Need to Know
The Future of SharePoint - What You Need to Know
 
Branding SharePoint from Prototype to Deployment - Workshop
Branding SharePoint from Prototype to Deployment - WorkshopBranding SharePoint from Prototype to Deployment - Workshop
Branding SharePoint from Prototype to Deployment - Workshop
 
Create your own SharePoint Master Pages and Page Layouts
Create your own SharePoint Master Pages and Page LayoutsCreate your own SharePoint Master Pages and Page Layouts
Create your own SharePoint Master Pages and Page Layouts
 
Share point 2013 apps and i mean it
Share point 2013 apps and i mean itShare point 2013 apps and i mean it
Share point 2013 apps and i mean it
 
Your SharePoint 2013 Branding Initiation
Your SharePoint 2013 Branding InitiationYour SharePoint 2013 Branding Initiation
Your SharePoint 2013 Branding Initiation
 
Shape SharePoint 2013 for Mobile
Shape SharePoint 2013 for MobileShape SharePoint 2013 for Mobile
Shape SharePoint 2013 for Mobile
 
The 2013 Design Manager - From HTML to SharePoint
The 2013 Design Manager - From HTML to SharePointThe 2013 Design Manager - From HTML to SharePoint
The 2013 Design Manager - From HTML to SharePoint
 
The Design Dilemma of Mobile and SharePoint
The Design Dilemma of Mobile and SharePointThe Design Dilemma of Mobile and SharePoint
The Design Dilemma of Mobile and SharePoint
 
Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365
 
Enhance SharePoint 2013 with Responsive Web Design
Enhance SharePoint 2013 with Responsive Web DesignEnhance SharePoint 2013 with Responsive Web Design
Enhance SharePoint 2013 with Responsive Web Design
 
Enhancing SharePoint with Responsive Web Design
Enhancing SharePoint with Responsive Web DesignEnhancing SharePoint with Responsive Web Design
Enhancing SharePoint with Responsive Web Design
 
Reshaping SharePoint for Evolving Internet Devices
Reshaping SharePoint for Evolving Internet DevicesReshaping SharePoint for Evolving Internet Devices
Reshaping SharePoint for Evolving Internet Devices
 
SharePoint Branding - Change Your Look
SharePoint Branding - Change Your LookSharePoint Branding - Change Your Look
SharePoint Branding - Change Your Look
 

Recently uploaded

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 

Recently uploaded (20)

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 

Supercharge Your SharePoint Framework Webpart with React

  • 1. ERIC OVERFIELD | PixelMill Microsoft MVP & RD SharePoint Advocate & Enthusiast @ericoverfield SUPERCHARGE YOUR SHAREPOINT FRAMEWORK WEBPART WITH REACT http://pxml.ly/EO-SPFx-React
  • 2. ERIC OVERFIELD President & Co-Founder of PixelMill Microsoft MVP, Office Servers & Services Microsoft Regional Director Published SharePoint Author SharePoint Community Organizer & Contributor @ericoverfield ericoverfield.com
  • 3. PixelMill is a modern SharePoint Design Agency based in Northern California. On the forefront of web design trends since 1998, PixelMill provides innovative collaboration portals to enhance the user adoption of SharePoint intranets, extranets, and public facing sites. PIXELMILL @pixelmillteam pixelmill.com
  • 4. 1. Introduction to React 2. Combine React with SPFx 3. Extend SPFx webparts with React OVERVIEW
  • 5. What is React? A Framework, a Library, Just a Verb?
  • 6. @ericoverfieldericoverfield.com What is React? • An open-source JavaScript library for creating web based user interfaces • Created and maintained by Facebook • Fast, declarative views, component based • Often compared to AngularJS • AngularJS is a framework, containing a model-view-controller • React is a library – not as many features, not a full framework • React has a View, but lacks Model and Controller components • One way data flow • Flux (Architecture): Dispatcher->Store->View->Action (back to Dispatcher) REACT OVERVIEW
  • 7. @ericoverfieldericoverfield.com Why might React work well with SPFx? • React is considered super-fast • Use of “Virtual DOM” • React only changes what has changed • i.e. only one item in a list instead of the entire list • A full featured framework such as AngularJS might be overkill • SPFx provides own “model” and “controller” features, UI aspect can be more simple • With less moving parts, many find easier to learn • React considered by many easier to debug as only providing View REACT AND SPFx +
  • 9. @ericoverfieldericoverfield.com React core – a Virtual DOM – “React DOM” • An abstraction of the real DOM – an abstraction of an abstraction • Real DOM tied to rendering, thus slow on updates • React DOM used for quick diffs, control of state change REACT DOM - VIRTUAL DOM
  • 10. @ericoverfieldericoverfield.com Base Component Building Block - ReactElement • A stateless, plain object describing what we want to render in a browser • Need to provide at least a type of element, tied to a rendering function • “props” allow for the passing of properties • var reactElement = React.createElement(type, props, children); REACTELEMENT
  • 11. @ericoverfieldericoverfield.com Stateful React Elements -> ReactComponent • Very similar to a ReactElement but has “state” • “setState” used to update state of component • Upon update of state, React will auto-rerender just what changed • Based on class, React.component, that accepts properties and state, that we extend REACTCOMPENENT
  • 12. @ericoverfieldericoverfield.com JavaScript XML (.jsx) – Syntatic language for rendering templates • Use JSX to write React Views • Adapted by TypeScript as well (.tsx) to allow for similar coding • Not required by React, but makes life easier • JSX gets transpiled to JavaScript JSX - JAVASCRIPT XML
  • 14. @ericoverfieldericoverfield.com React SPFx Webpart folder structure – Similar as a no-framework webpart • src: primary webpart TypeScript source code • src/webparts/”yourwebpart”/components: .tsx / React Components • config: json configuration files for build process • typings: TypeScript typings for JS libs – legacy • lib: Build files (TS compiled JS) ready for bundle • dist: Final web ready code for distribution • sharepoint: .spapp file for App Catalog • node_modules: NodeJS modules (JS) for toolchain REACT SPFx WEBPART PROJECT STRUCTURE
  • 15. @ericoverfieldericoverfield.com React and SPFx • Normally somewhat complex to include React into project • react and react-dom needed, then create scaffolding, SPFx makes much more simple • With SPFx, need to import react and react-dom where webpart defined • import * as React from 'react'; • import * as ReactDom from 'react-dom'; • In Webpart render() function, create React Element, and render UTILIZE REACT IN SPFx WEBPARTS
  • 16. @ericoverfieldericoverfield.com Office UI Fabric • A framework for building custom Office 365 / SharePoint front-end experiences • Open source: https://github.com/OfficeDev/office-ui-fabric-core • https://dev.office.com/fabric • Primary pillars • Core: Styles / CSS • JavaScript: Interactions • React: UI integration • AngularJS: open source project • SPFx pre-integrated with React OFFICE UI FABRIC REACT AND SPFx
  • 17. @ericoverfieldericoverfield.com Why you will use Office UI Fabric • Consistency of interface with custom components • SharePoint Framework has UI Fabric built in • Allows developers to focus on functionality, not the look • Speed up the development cycle WHY OFFICE UI FABRIC
  • 18. Demo CREATE A REACT ENABLED SPFx WEBPART
  • 19. A MORE COMPLEX REACT SPFx WEBPART Demo
  • 21. EXTENDING SPFx WEBPART PROPERTY PANE WITH REACT Demo
  • 22. REVIEW 1. Introduction to React 2. Combine React with SPFx 3. Extend SPFx webparts with React
  • 24. RESOURCES • Official React Homepage https://facebook.github.io/react/ • Office UI Fabric React https://dev.office.com/fabric#/components • GitHub: Office UI Fabric React https://github.com/OfficeDev/office-ui-fabric-react • Office UI Fabric React in a SPFx Webpart https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/use-fabric-react-components • SPFx Fantastic 40 Web Parts https://github.com/OlivierCC/spfx-40-fantastics • Even more sample React SPFx Web Parts https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples • React Custom Property Pane Control https://dev.office.com/sharepoint/docs/spfx/web-parts/guidance/build-custom-property-pane-controls • Presentation Source code https://github.com/eoverfield/SPFx-Demos/tree/master/React-WebPart-Demos
  • 25. THANK YOU SUPERCHARGE YOUR SHAREPOINT FRAMEWORK WEBPART WITH REACT

Editor's Notes

  1. Slides will be available from blog and twitter Extend the basic ootb SPFx webpart by including React. Look at what React is, out it is put together, how to use it within SPFx DEMO HEAVY
  2. Declarative – describing what to do to date, leaving the implementation up to library One way data flow -> dispatcher -> store -> view Action takes from view back to dispatcher
  3. https://www.slideshare.net/JimitShah39/reactjs-the-dawn-of-virtual-dom
  4. https://facebook.github.io/react/docs/jsx-in-depth.html JavaScript XML made popular by React JSX to write React views JSX is a preprocessor step that adds XML syntax to JavaScript. You can definitely use React without JSX but JSX makes React a lot more elegant. Just like XML, JSX tags have a tag name, attributes, and children. If an attribute value is enclosed in quotes, the value is a string. Otherwise, wrap the value in braces and the value is the enclosed JavaScript expression. http://buildwithreact.com/tutorial/jsx TypeScript also uses JSX as well, that is where we get the .tsx extension from
  5. Webpart includes “components” folder that contains the React Views, Sass and View state property interfaces Sass is tied to the React Views
  6. simple react, then tear apart and add more functionality https://github.com/giuleon/spfxWeather/
  7. https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-todo-basic
  8. https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-multipage Waldek Mastykarz (MVP, Rencore, @waldekm)
  9. https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-custompropertypanecontrols