Inspired by facebook/react#10923 (comment)
class OnlyOnClient extends Component {
static propTypes = {
placeholder: PropTypes.node,
html: PropTypes.string
};
state = {Inspired by facebook/react#10923 (comment)
class OnlyOnClient extends Component {
static propTypes = {
placeholder: PropTypes.node,
html: PropTypes.string
};
state = {// fork.js
const { fork } = require('child_process');
const getMessage = () =>
new Promise((resolve, reject) => {
fork('src/child')
.on('message', message => {
resolve(message);
})docker run -it -d -v "$(PWD)":/app -v /app/node_modules -w /app -p 8080:8080 --name my_project node:8 /bin/bashNotice how we mount new volume above
node_modulesfolder. In this way, we significantly improve performance for host machines powered by OSX or Windows. Otherwise, we will stay with a poor native performance when the Docker synchronize file system state on host and container onnpm installcommand execution.
image = 'node:8.9.3'
container = 'my-project'
volume = 'my-project-volume'
site_port = '8080:8080'
build:
docker run -it -d -v '$(CURDIR)':/app -v ${volume}:/app/node_modules -w /app -p $(site_port) --name $(container) $(image) /bin/bash
docker exec -it $(container) yarn installconst DeleteItemMutation = ({ id, render }) => (
<Mutation mutation={DELETE_ITEM_MUTATION}>
{mutate =>
render({
deleteItem: id => {
mutate({
variables: { id },
// optimisticResponse
// updatesudo yum install java-1.8.0-openjdksudo /usr/sbin/alternatives --config javasudo /usr/share/elasticsearch/bin/elasticsearch-plugin install discovery-ec2/etc/elasticsearch/sudo -i service elasticsearch start/var/logs/elasticsearch/sudo chkconfig elasticsearch on (for verifying sudo chkconfig --list)Was taken from https://github.com/kentcdodds/testing-workshop/tree/master/other/configuration/calculator.solution
{
"babel": {
"presets": "./.babelrc.js"
}
}# For case insensitive
diskutil apfs addVolume disk1 APFS <Volume name>
# For case sensitive
diskutil apfs addVolume disk1 "Case-sensitive APFS" <Volume name>The newly created volume will be mounted to the /Volume/