This document is created to overview existing React 16+ features.
Last updated: 21/03/2019
Earlier React supported only single return from the render method:
render() {| --- | |
| import { withBranch, renderComponent } from 'recompose'; | |
| withBranch( | |
| props => props.data.loading, | |
| renderComponent(CustomGhostComponent), | |
| ); | |
| --- | |
| import { withProps, compose } from 'recompose'; | |
| import { withGhost } from '@aap/boostrap'; |
| Hash: 8ebeffa40e80dcf45116 | |
| Version: webpack 4.17.1 | |
| Child | |
| Hash: 8ebeffa40e80dcf45116 | |
| Time: 35ms | |
| Built at: 09/08/2018 2:54:15 PM | |
| Asset Size Chunks Chunk Names | |
| server.js 4.55 KiB main [emitted] main | |
| Entrypoint main = server.js | |
| [./src/entries/server.jsx] 118 bytes {main} [built] |
| Hash: 83ea41009a25bd992f66e3fbc3208c63a07d0073 | |
| Version: webpack 4.17.1 | |
| Child | |
| Hash: 83ea41009a25bd992f66 | |
| Time: 6713ms | |
| Built at: 09/08/2018 2:25:38 PM | |
| Asset Size Chunks Chunk Names | |
| bundle.js 3.22 MiB main [emitted] main | |
| Entrypoint main = bundle.js | |
| [./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 489 bytes {main} [built] |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Akinator</title> | |
| </head> | |
| <body> | |
| <span id="question"></span> | |
| <br> | |
| <button id="firstButton" type="button" name="button"></button> |
| { | |
| "presets": ["env"], | |
| "plugins": [ | |
| "transform-typescript", | |
| "transform-class-properties" | |
| ] | |
| } |
| > tcpdump -i lo0 dst port 1995 | |
| tcpdump: verbose output suppressed, use -v or -vv for full protocol decode | |
| listening on lo0, link-type NULL (BSD loopback), capture size 262144 bytes | |
| 22:29:03.261714 IP localhost.62949 > localhost.perf-port: Flags [SEW], seq 1585304512, win 65535, options [mss 16344,nop,wscale 5,nop,nop,TS val 259925136 ecr 0,sackOK,eol], length 0 | |
| 22:29:03.361942 IP localhost.62949 > localhost.perf-port: Flags [S], seq 1585304512, win 65535, options [mss 16344,nop,wscale 5,nop,nop,TS val 259925236 ecr 0,sackOK,eol], length 0 | |
| 22:29:03.462581 IP localhost.62949 > localhost.perf-port: Flags [S], seq 1585304512, win 65535, options [mss 16344,nop,wscale 5,nop,nop,TS val 259925336 ecr 0,sackOK,eol], length 0 | |
| 22:29:03.562713 IP localhost.62949 > localhost.perf-port: Flags [S], seq 1585304512, win 65535, options [mss 16344,nop,wscale 5,nop,nop,TS val 259925436 ecr 0,sackOK,eol], length 0 | |
| 22:29:03.664244 IP localhost.62949 > localhost.perf-port: Flags [S], seq 1585304512, win 65535, options [mss 16344,no |
| let {resolve} = require('path'); | |
| let webpack = require('webpack'); | |
| module.exports = { | |
| entry: resolve('index.js'), | |
| output: { | |
| path: resolve('dist'), | |
| filename: 'bundle.js' | |
| }, | |
| plugins: [ |