| category | type | title | 
|---|---|---|
| Components | Feedback | Alert | 
Alert component for feedback.
| if ('serviceWorker' in navigator) { | |
| navigator.serviceWorker | |
| .register('./sw.js') | |
| .then(function(registration) { | |
| const interval = setInterval(() => { | |
| try { | |
| registration.installing.postMessage({ | |
| 'api.github.com/users/monkindey': {} | |
| }); | |
| } catch (err) { | 
| import React from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| class Issue3926 extends React.Component { | |
| constructor() { | |
| super(); | |
| this.handleChange = this.handleChange.bind(this); | |
| this.handleComposition = this.handleComposition.bind(this); | |
| this.onComposition = false; | |
| this.state = { | 
| class Slider extends Component{ | |
| renderPlugins(){ | |
| let { children } = this.props; | |
| let dataModel = {...this.props,...this.state}; | |
| return do{ | |
| if(typeof children=='function'){; | |
| children(dataModel) | |
| }else{ | |
| children; | |
| } | 
| import React, { Component } from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| import { createStore, applyMiddleware } from 'redux'; | |
| import { connect, Provider } from 'react-redux'; | |
| import createSagaMiddleware, { delay } from 'redux-saga'; | |
| import { put, takeEvery, all } from 'redux-saga/effects'; | |
| function* incrementAsync() { | |
| yield delay(1000); | |
| yield put({ type: 'INCREMENT' }); | 
yarnyarn build:notruntime > path/to/fileIt will be clear to understand the flow of webpack.
| const http = require('http'); | |
| const config = require('./config'); | |
| const port = config.port.injured; | |
| const host = config.host; | |
| http | |
| .createServer((req, res) => { | |
| console.log(req.headers.cookie); | |
| res.writeHead(200, { | |
| 'Set-Cookie': host | 
| import React, { Component } from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| class Getter extends Component { | |
| firstAndLastName() { | |
| return `${this.props.firstName} ${this.props.lastName}`; | |
| } | |
| get fullName() { | |
| return `${this.props.firstName} ${this.props.lastName}`; |