Crossing Over to the             Darkside

A React Developer's Journey into Angular

@nellarro

Jenell Pizarro

Jenell Pizarro

@nellarro

Crossing Over to the Dark Side

jenellpizarro.com

The Light Side

React

  • UI Library
  • Light 
  • Introduction to JSX
  • Can be paired with other libraries to create an MVC

@nellarro

Jenell Pizarro

@nellarro

Crossing Over to the Dark Side

The Dark Side

Angular

  • MVC Framework 
  • HTML and CSS exist as separate entities
  • Can be paired with other libraries like NgRx

@nellarro

Crossing Over to the Dark Side

Starting

with Angular

@nellarro

Crossing Over to the Dark Side

Ionic

@nellarro

Crossing Over to the Dark Side

Ionic CLI

@nellarro

Crossing Over to the Dark Side

@nellarro

import { ActionSheetController } from 'ionic-angular';

export class MyPage {
  constructor(public actionSheetCtrl: ActionSheetController) {
  }

  presentActionSheet() {
    let actionSheet = this.actionSheetCtrl.create({
      title: 'Modify your album',
      buttons: [
        {
          text: 'Destructive',
          role: 'destructive',
          handler: () => {
            console.log('Destructive clicked');
          }
        },{
          text: 'Archive',
          handler: () => {
            console.log('Archive clicked');
          }
        },{
          text: 'Cancel',
          role: 'cancel',
          handler: () => {
            console.log('Cancel clicked');
          }
        }
      ]
    });
    actionSheet.present();
  }
}

@nellarro

Crossing Over to the Dark Side

Theming & Design

@nellarro

Crossing Over to the Dark Side

Templates

@nellarro

Crossing Over to the Dark Side

Patience

@nellarro

Crossing Over to the Dark Side

Ionic GUI

@nellarro

Crossing Over to the Dark Side

this slide left blank for...

dramatic effect.

@nellarro

Crossing Over to the Dark Side

Angular: The Good Parts

 

  • Opinionated
  • Directives
  • Easy to read

@nellarro

Crossing Over to the Dark Side

List

Angular/Ionic

  • Readable
  • Opinionated
  • Brain doesn't die

@nellarro

Crossing Over to the Dark Side

<ion-list>

  <ion-item ng-repeat="item in items" item="item">
    List Item {{ item.id }}
  </ion-item>

</ion-list>

Angular: The Bad Parts

 

  • Opinionated
  • Directives
  • Not React

@nellarro

Crossing Over to the Dark Side

But Why?!?!

  • JSX -- I miss you, friend. Remember me.
  • What is ngTryingToDoAThingThatJSDoesOutOfBox?!
  • What do you mean I can't create my own architecture?! What if I want a giraffe as a button?! 

@nellarro

Crossing Over to the Dark Side

Jenell's actual, real-life conversations with React while learning Angular/Ionic

@nellarro

Crossing Over to the Dark Side

<ion-menu [content]="content">
  <ion-header>
    <ion-toolbar>
      <ion-title>Menu</ion-title>
    </ion-toolbar>
  </ion-header>
  <ion-content>
    <ion-list>
      <button ion-item (click)="openPage(homePage)">
        Home
      </button>
      <button ion-item (click)="openPage(friendsPage)">
        Friends
      </button>
      <button ion-item (click)="openPage(eventsPage)">
        Events
      </button>
      <button ion-item (click)="closeMenu()">
        Close Menu
      </button>
    </ion-list>
  </ion-content>
</ion-menu>

<ion-nav id="nav" #content [root]="rootPage"></ion-nav>

@nellarro

Crossing Over to the Dark Side

Learning what you want out of your code

@nellarro

Crossing Over to the Dark Side

Thank you

@nellarro

Crossing Over to the Dark Side

Crossing Over to the Darkside

By Jenell Pizarro

Crossing Over to the Darkside

  • 673