A plugin to make authoring with MUI components efficient, both for humans and bundlers.
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
const withLuckyNumber = Component => (props) => <Component number={Math.random()} {...props} />; | |
const UnconnectedApp = ({ number }) => <div>Your number is: {number}!</div>; | |
const App = withLuckyNumber(UnconnectedApp); |
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 { createElement } from 'react'; | |
import { compose } from 'ramda'; | |
import { lifecycle, withProps } from 'recompose'; | |
const enhance = compose( | |
lifecycle({ componentDidMount() { | |
this.refs.node.scrollIntoView({block: 'end', behavior: 'smooth'}); | |
} }), | |
withProps({ ref: 'node' }), | |
); |
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
// Basic AJAX Example | |
import React, { Component } from 'react' | |
import { render } from 'react-dom' | |
import { createStore, applyMiddleware, combineReducers } from 'redux' | |
import { Provider, connect } from 'react-redux' | |
import axios from 'axios' | |
import createLogger from 'redux-logger' | |
import thunkMiddleware from 'redux-thunk' | |
const logger = createLogger() |
Updating to macOS Sierra is causing trouble with React Native due to some of the Node.js and system utilities it uses. Specifically the watch utility fails due to a limit on the number of files which can be opened at a time.
The following command shows the current limit.
launchctl limit maxfiles
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Counter</title> | |
<link rel="stylesheet" href="/r/screen.css" media="screen"> | |
<meta name="description" content="An HTML5 counter"> |
https://devcenter.heroku.com/articles/custom-domains http://thenomadicfreelancer.blogspot.com/2012/08/pointing-godaddy-domain-to-your-heroku.html
For each custom subdomain use domains:add
in the Terminal.