Skip to content

Instantly share code, notes, and snippets.

Andrey Morozov amje

Block or report user

Report or block amje

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gaearon
gaearon / connect.js
Last active Sep 19, 2019
connect.js explained
View connect.js
// connect() is a function that injects Redux-related props into your component.
// You can inject data and callbacks that change that data by dispatching actions.
function connect(mapStateToProps, mapDispatchToProps) {
// It lets us inject component as the last step so people can use it as a decorator.
// Generally you don't need to worry about it.
return function (WrappedComponent) {
// It returns a component
return class extends React.Component {
render() {
return (
@ayamflow
ayamflow / gist:b602ab436ac9f05660d9c15190f4fd7b
Created May 9, 2016
Safari border-radius + overflow: hidden + CSS transform fix
View gist:b602ab436ac9f05660d9c15190f4fd7b
// Add on element with overflow
-webkit-mask-image: -webkit-radial-gradient(white, black);
You can’t perform that action at this time.