Home Reference Source
public class | source

CounterComponent

Extends:

react~Component → CounterComponent

A Counter with increment and decrement buttons

Decorators:

Example:

import Counter from '../Counter'; // Some relative path to Counter module export
<Counter {...counterProps} />

Static Member Summary

Static Public Members
public static

propTypes: {"increment": *, "incrementIfOdd": *, "incrementAsync": *, "decrement": *, "counter": *, "intl": *}

Method Summary

Public Methods
public

render(): ViewComponent

render

Static Public Members

public static propTypes: {"increment": *, "incrementIfOdd": *, "incrementAsync": *, "decrement": *, "counter": *, "intl": *} source

Properties:

NameTypeAttributeDescription
increment function

Increment action

incrementIfOdd function

Increment If Odd action

incrementAsync function

Increment Async action

decrement function

Decrement action

counter Object

Counter state

intl Object

React Intl API object

Public Methods

public render(): ViewComponent source

render

Return:

ViewComponent

View that represents the Counter