Skip to content

Instantly share code, notes, and snippets.

View gist:3f4b812fbf8bacd5192c244c83f10705
#include "stdafx.h"
#include <windows.h>
#include <iostream>
#include <string>
#include <iostream>
#include <string>
#include <time.h>
#include <stdlib.h>
@fanux365
fanux365 / App.jsx
Created Apr 14, 2018
React.js Little clicker counter
View App.jsx
import React, { Component } from 'react';
class App extends Component {
constructor(props) {
super(props);
this.state = {counter: 0};
}
CenterButtonClickEvent(e){
this.setState((prevState, props) => ({
counter: prevState.counter + 1