SlideShare a Scribd company logo
Migrating from
AngularJS to React
Adir Amsalem, Front End Developer
adiramsalem AdirAmsalem@amsalemadiradira@wix.com
Story Time
Jim Clark
Marc Andressen
April, 1994
March, 1995
Netscape own 75% of the
browser market
August, 1995
Microsoft releases
Internet Explorer 1
Migrating From AngularJS To React
January, 1997
Netscape releases
Netscape Navigator 4.0
November, 2000
Netscape releases
Netscape Navigator 6.0
1997 - 2000
Microsoft releases
new version every year
Would you use 2-3 years old
Chrome?
Migrating From AngularJS To React
Browser Market - 2003
Microsoft - 94.4%
Netscape - 1.4%
Joel Spolsky
CEO & Co-Founder of StackOverflow
Migrating From AngularJS To React
They did it by making the single worst strategic
mistake that any software company can make:
They decided to rewrite the code from scratch.
- Joel Spolsky
“
“
Hi.
I am Adir Amsalem.
● Front end @ Wix
● Co-organizer @ YGLF
Lithuania
Ukraine
Vilnius
Kyiv
Dnipro
Wix Engineering Locations
Israel
Tel-Aviv
Be’er Sheva
AGENDA
Planning
Execution
Examples
More than 450 engineers (40% of all Wix)
Deploy to production
every 8 minutes
30 dev groups
diverse tech stack
Over 200 micro
services in production
Planning
01
Start small,
one step at a time
Tip #1
Remember: migration, not a
complete rewrite.
Wix
Stores
Cart
Slowly transition
everything else in parallel
Tip #2
As a side job, while product
features are still top priority.
Know what you
don’t know
Tip #3
It’s better to start in 2 weeks delay,
than to finish in 3 months delay.
Know the project
intimately
Tip #4
Identify every flow, component and
bug fix. Years of programming work.
Migrating From AngularJS To React
Execution
02
Put it on production
as fast as possible
Tip #1
Simple systems are easier to
debug.
Re-think, don’t
copy-paste
Tip #2
Ask why. Learn from past mistakes.
Adjust to new requirements.
“Reason from first principles”
- Elon Musk, CEO of Tesla, SpaceX & Neuralink
App
Widgets
App
Widgets
OnClick
App
Widgets
Expands
App
Widgets
Notifies App
App
Widgets
Updates its height
and notify an
external service
AngularJS
Widget:
$scope.$emit(‘contentChanged’);
AngularJS
Directive on top component:
$scope.$on(‘contentChanged’, () => {
// ...
});
React
?
Migrating From AngularJS To React
Examples
03
Bootstrapping & Dependency Injection
// import ...
const localStorage = window.localStorage;
const biLogger = configureBILogger();
const httpClient = configureHttpClient();
const stores = configureStores({
localStorage,
biLogger,
httpClient
}, initialState);
const appLoader = AppLoader(App);
ReactDOM.render(
<Provider {...stores}>
<appLoader/>
</Provider>,
document.getElementById('root')
);
interface StoresDependencies {
httpClient?: HttpClient;
biLogger?: BILogger;
localStorage?: ILocalStorage;
}
interface StoresInitialState {
cart?: ICart;
}
function configureStores(dependencies: StoresDependencies, initialState) {
const siteStore = getSiteStore(dependencies, initialState);
const cartStore = getCartStore(dependencies, initialState);
return {
siteStore,
cartStore
};
}
function getSiteStore(dependencies: StoresDependencies, initialState) {
const {localStorage, biLogger} = dependencies;
return new SiteStore({
localStorage,
biLogger
});
}
function getCartStore(dependencies: StoresDependencies, initialState) {
const {httpClient} = dependencies;
const {cart} = initialState;
return new CartStore({
httpClient,
cart
});
}
componentDidMount() {
const {siteStore, cartStore} = this.props;
Promise.all([
siteStore.getSettings(),
cartStore.getCart()
]).then(() =>
this.setState({loaded: true}));
}
render() {
const {loaded} = this.state;
return (<div>
{loaded
? <ComponentToWrap {...this.props}/>
: <LoadingSpinner/>}
</div>);
}
Testing
Migrating From AngularJS To React
Takeaways
Thank You
adiramsalem AdirAmsalem@amsalemadiradira@wix.com
Q&A
adiramsalem AdirAmsalem@amsalemadiradira@wix.com

More Related Content

PDF
GraphQL @ Wix
PDF
AWS Well-Architected: Build Better Architecture, Better Business
PPTX
Enterprise level application in 5 min
PDF
Monitoring the #DevOps way
PPTX
Introduction to angular
PDF
All about Context API
PDF
Jenkins: Portability Testing & Dealing With Limits
PDF
Stripe con 2021 UI stack
GraphQL @ Wix
AWS Well-Architected: Build Better Architecture, Better Business
Enterprise level application in 5 min
Monitoring the #DevOps way
Introduction to angular
All about Context API
Jenkins: Portability Testing & Dealing With Limits
Stripe con 2021 UI stack

What's hot (18)

PPTX
The New .NET Enterprise Stack
PDF
10 Steps to Cloud Happiness
PPTX
Java and services code lab spring boot and spring data using mongo db
PDF
Collibra wrojug-ontrack-20100424
PDF
Matheus Marsiglio - Isomorphic React + Redux App
PPTX
CollabDays 2020 Barcelona - Serverless Kubernetes with KEDA
PDF
Deployment Automation & Self-Healing with Dynatrace & Ansible
PDF
ServiceWorkerとES6 Modules時代のTypescript開発考察
PPTX
TIAD : Full stack automation
PDF
Tune your App Perf (and get fit for summer)
PDF
Chaos Engineering with Kubernetes - Berlin / Hamburg Chaos Engineering Meetup...
PPTX
AWS CodeDeploy - basic intro
PPTX
Serverless Orchestration with Azure Durable Functions
PDF
Advanced A/B Testing at Wix - Aviran Mordo and Sagy Rozman, Wix.com
PDF
Image scanning using Clair
PDF
OpenStack Ansible for private cloud at Kaidee
PPTX
CI/CD As first and last line of defence
PDF
AngularJS Toronto: Ng babel+webpack
The New .NET Enterprise Stack
10 Steps to Cloud Happiness
Java and services code lab spring boot and spring data using mongo db
Collibra wrojug-ontrack-20100424
Matheus Marsiglio - Isomorphic React + Redux App
CollabDays 2020 Barcelona - Serverless Kubernetes with KEDA
Deployment Automation & Self-Healing with Dynatrace & Ansible
ServiceWorkerとES6 Modules時代のTypescript開発考察
TIAD : Full stack automation
Tune your App Perf (and get fit for summer)
Chaos Engineering with Kubernetes - Berlin / Hamburg Chaos Engineering Meetup...
AWS CodeDeploy - basic intro
Serverless Orchestration with Azure Durable Functions
Advanced A/B Testing at Wix - Aviran Mordo and Sagy Rozman, Wix.com
Image scanning using Clair
OpenStack Ansible for private cloud at Kaidee
CI/CD As first and last line of defence
AngularJS Toronto: Ng babel+webpack
Ad

Similar to Migrating From AngularJS To React (20)

PDF
From AngularJS to React: why migration is a must
PPTX
Professionalizing the Front-end
PDF
Front end-modernization
PDF
Front end-modernization
PDF
Front-End Modernization for Mortals
PPTX
AngularJS to React
PDF
Developing Responsive Web Applications With Ajax And Jquery Sandeep Kumar Pat...
PDF
Accelerating Add-on Development From Concept to Launch
KEY
Nitobi/PhoneGap at Bootup 2011
PPTX
Full stack development
PDF
ReactJS Development_ Everything You Need to Know.pdf
PDF
UI developer
PDF
Full Stack Web Development Course - Brochure - Manojkumar C - Fresh Spar Tech...
PDF
Full Stack Web Development Course - Brochure - Manojkumar Chandrasekar - Fres...
PDF
A guide to hiring a great developer to build your first app (redacted version)
PDF
Tech Thursdays: Building Products
PDF
How Open Source Changed My Career by abdelrahman ismail
PDF
Mastering Frontend Development A Comprehensive Guide To Learn Frontend Develo...
PDF
Startup Engineering for Non-Technical Founders
PDF
Prototyping like it is 2022
From AngularJS to React: why migration is a must
Professionalizing the Front-end
Front end-modernization
Front end-modernization
Front-End Modernization for Mortals
AngularJS to React
Developing Responsive Web Applications With Ajax And Jquery Sandeep Kumar Pat...
Accelerating Add-on Development From Concept to Launch
Nitobi/PhoneGap at Bootup 2011
Full stack development
ReactJS Development_ Everything You Need to Know.pdf
UI developer
Full Stack Web Development Course - Brochure - Manojkumar C - Fresh Spar Tech...
Full Stack Web Development Course - Brochure - Manojkumar Chandrasekar - Fres...
A guide to hiring a great developer to build your first app (redacted version)
Tech Thursdays: Building Products
How Open Source Changed My Career by abdelrahman ismail
Mastering Frontend Development A Comprehensive Guide To Learn Frontend Develo...
Startup Engineering for Non-Technical Founders
Prototyping like it is 2022
Ad

Recently uploaded (20)

PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
WOOl fibre morphology and structure.pdf for textiles
PPTX
cloud_computing_Infrastucture_as_cloud_p
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Getting Started with Data Integration: FME Form 101
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
A Presentation on Artificial Intelligence
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
Mushroom cultivation and it's methods.pdf
PDF
DP Operators-handbook-extract for the Mautical Institute
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
Hindi spoken digit analysis for native and non-native speakers
Zenith AI: Advanced Artificial Intelligence
Encapsulation_ Review paper, used for researhc scholars
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
WOOl fibre morphology and structure.pdf for textiles
cloud_computing_Infrastucture_as_cloud_p
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Getting Started with Data Integration: FME Form 101
Unlocking AI with Model Context Protocol (MCP)
A Presentation on Artificial Intelligence
A novel scalable deep ensemble learning framework for big data classification...
Web App vs Mobile App What Should You Build First.pdf
Mushroom cultivation and it's methods.pdf
DP Operators-handbook-extract for the Mautical Institute
Digital-Transformation-Roadmap-for-Companies.pptx
Chapter 5: Probability Theory and Statistics
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Heart disease approach using modified random forest and particle swarm optimi...
Hindi spoken digit analysis for native and non-native speakers

Migrating From AngularJS To React