Get a Jump-Start on React

Jose Gonzalez

@JoseGonz321

Jose Gonzalez

@JoseGonz321

MindBodySoulDeveloper.com

Street Creds

  • Web Developer

  • ASP.NET C# (10yrs+)

  • "Backend"

Always flirting with

Front-End

GEOCITES

ANGELFIRE

Road Map

Story Time

Expectations

ASP.NET Core

React

 

 

How did I get

here?

Learn
JavaScript

Angular1

Angular2

No more

To-do Apps

Weather Apps

What API should I use?

Expectations

Not Covered

Redux (Flux)

Routing

Facebook patents

Tech comparisons

Asp.Net Core

Web Api

 

React

Components

JSX

Events

Covered

LOTS OF

LIVE CODING!

ASP.NET CORE

Web API

JavaScript library for building interfaces

React writes HTML in JavaScript

Others extend HTML

Declarative

Concern with

what

 not

how

Logic written in

JavaScript

instead of

Templates

Virtual DOM

Virtual representation of

HTML in-memory

Tree Reconciliation

Only write back the differences between
new and previous tree

Analogy: source control commits

Components

Describe UIs

Simple JS functions

Reusable & Composable

Props vs State

can be changed

cannot be changed

Fixed

Component Types

Function Component

Class Component

@SamerBuna

Function Component

function Button() {
    return (
        <button>Go</button>
    )
}

Class Component

Same as function component

+

Handles state

@SamerBuna

Class Component

class Hello extends React.Component {
  render() {
    return (
      <div className="container">
        <h1>Getting Started</h1>
      </div>
    );
  }
}

JSX

<div><H1><ul><li><p>

Optional

JSX Func Example

function Button() {
    return (
        <button>Go</button>
    )
}
function Button() {
    return (
        React.createElement("button", null, "Go")
    );
}

JSX Class Example

class Hello extends React.Component {
  render() {
    return (
      <div className="container">
         <h1>Getting Started</h1>
      </div>
    );
  }
}
class Hello extends React.Component {
  render() {
    return (
      React.createElement("div", 
        { className: "container"},
          React.createElement("h1", null, "Getting Started")
      )
    );
  }
}

FunFunFunction

Events

componentDidMount()

componentDidUpdate()

https://facebook.github.io/react/docs/react-component.html

Next Step!

Resources

bit.ly/JumpStartReact

Jose Gonzalez

@JoseGonz321

MindBodySoulDeveloper.com

Get a Jump-Start on React

By Jose Gonzalez

Get a Jump-Start on React

Getting a jump-start on React. Using ASP.NET Core as the back end and React as the front end.

  • 342