This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { branch } from 'recompose'; | |
const MyComponent = () => <h2>Hello!</h2>; | |
const IsLessThanZero = BaseComponent => props => ( | |
<div> | |
<BaseComponent {...props} /> | |
<h1>Less or equal than zero!</h1> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { withState } from 'recompose'; | |
const MyComponent = ({ counter, setCounter }) => ( | |
<div> | |
<h1>{counter}</h1> | |
<button onClick={() => setCounter(counter + 1)}>Add</button> | |
<button onClick={() => setCounter(counter - 1)}>Remove</button> | |
</div> | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { lifecycle } from 'recompose'; | |
const MyComponent = ({ data }) => ( | |
<div>{data}</div> | |
); | |
const MyComponentModified = lifecycle({ | |
componentDidMount() { | |
doSomething().then(data => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ brew install -v libxmlsec1 | |
==> Installing dependencies for libxmlsec1: libunistring, p11-kit | |
rm /usr/local/include/unicase.h | |
rm /usr/local/include/uniconv.h | |
rm /usr/local/include/unictype.h | |
rm /usr/local/include/unigbrk.h | |
rm /usr/local/include/unilbrk.h | |
rm /usr/local/include/uniname.h | |
rm /usr/local/include/uninorm.h | |
rm /usr/local/include/unistdio.h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: circleci/node:8.2.1 | |
steps: | |
- checkout | |
- run: echo "My first job is build." | |
test: | |
steps: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: circleci/node:8.2.1 | |
steps: | |
- checkout | |
- run: echo "My first job is build." | |
test: | |
steps: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: circleci/node:8.2.1 | |
steps: | |
- checkout | |
- run: echo "My first job is build." | |
test: | |
steps: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: circleci/ruby:2.4.1 | |
steps: | |
- checkout | |
- run: echo "A first hello" |
Some articles, videos, and code to guide your study with React.