Invoke a Function

Define a Function

Invoke a Function with 2 Arguments

Partially Apply a Function

Convert a String to UpperCase

Concatenate a String

Partially Apply a Concat Function

Flip a Function

Compose Simple Functions

Compose Defined Functions

import Head from 'next/head'
import { Component } from 'react'

export default class extends Component {
    state = {
        firstName: 'John',
        lastName: 'Lindquist'
    }

    handleClick = () => {
        this.setState({
            firstName: 'Mindy'
        })
    }

    handleInput = event => {
        this.setState({
            lastName: event.target.value
        })
    }

    render = () => <div>
        <Head>
            <link rel="stylesheet" href="https://unpkg.com/tachyons@4.6.1/css/tachyons.min.css" />
        </Head>

        <input onInput={this.handleInput} />
        <hr />
        {this.state.firstName} {this.state.lastName}
        <hr />
        <button onClick={this.handleClick}>Change Name</button>
    </div>
}

results matching ""

    No results matching ""