How to use the redux-zero/react.connect function in redux-zero

To help you get started, we’ve selected a few redux-zero examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github axetroy / blog / src / component / github-orgs / index.js View on Github external
);
                      });
                    })()}
                  
                
              
            );
          })}
        
      
    );
  }
}
export default connect(
  state => ({
    ORGS: state.ORGS,
    REPO_STAT: state.REPO_STAT,
    ORG_REPOS: state.ORG_REPOS
  }),
  actions
)(GithubOrganizations);
github axetroy / blog / src / widget / showcase.js View on Github external
photoIndex: (photoIndex + images.length - 1) % images.length
                })
              }
              onMoveNextRequest={() =>
                this.setState({
                  photoIndex: (photoIndex + 1) % images.length
                })
              }
            />
          
        ) : null}
      
    );
  }
}
export default connect(
  state => ({ SHOW_CASES: state.SHOW_CASES }),
  actions
)(withRouter(Showcase));
github axetroy / blog / src / pages / gists / index.js View on Github external
style={{ fontSize: "1.6rem", marginRight: "0.5rem" }}
                      name="gist"
                      mega
                    />
                    {gist.description}
                  
                
              );
            })}
          
        
      
    );
  }
}
export default connect(
  state => ({ GISTS: state.GISTS }),
  actions
)(withRouter(Gists));
github axetroy / blog / src / widget / stat.js View on Github external
<p></p>
          <ul>
            {this.state.events
              .filter(v =&gt; v)
              .slice(0, 10)
              .map((v, i) =&gt; {
                return <li>{v}</li>;
              })}
          </ul>
        
      
    );
  }
}
export default connect(
  state =&gt; ({
    GISTS: state.GISTS,
    REPOS: state.REPOS,
    FOLLOWERS: state.FOLLOWERS
  }),
  actions
)(withRouter(Stat));
github axetroy / blog / src / pages / posts / index.js View on Github external
}
                  defaultCurrent={this.state.meta.page}
                  defaultPageSize={this.state.meta.per_page}
                  total={this.state.meta.total}
                /&gt;
              
            
          ) : (
            ""
          )}
        
      
    );
  }
}
export default connect(
  state =&gt; ({
    POSTS: state.POSTS
  }),
  actions
)(withRouter(Posts));
github axetroy / blog / src / widget / gist.js View on Github external
type="default"
                loading={this.state.loading}
                onClick={() =&gt; this.getNextGistList()}
              &gt;
                {this.state.loading ? "Loading" : "More"}
              
            
          ) : (
            ""
          )}
        
      
    );
  }
}
export default connect(state =&gt; ({}), actions)(withRouter(Gists));
github axetroy / blog / src / pages / todos / index.js View on Github external
);
                          })}
                        
                      
                    
                  
                
              
            );
          })}
        
      
    );
  }
}
export default connect(
  state =&gt; ({
    TODOS: state.TODOS,
    TODO_LABELS: state.TODO_LABELS
  }),
  actions
)(withRouter(TodoList));
github axetroy / blog / src / pages / home / index.js View on Github external
<div>
          </div>
        
      
    );
  }
}
export default connect(
  state =&gt; ({
    README: state.README
  }),
  actions
)(Home);
github axetroy / blog / src / widget / todo.js View on Github external
type="default"
                loading={this.state.loading}
                onClick={() =&gt; this.getNextTodoList()}
              &gt;
                {this.state.loading ? "Loading" : "More"}
              
            
          ) : (
            ""
          )}
        
      
    );
  }
}
export default connect(state =&gt; ({}), actions)(withRouter(TodoList));
github axetroy / blog / src / component / github-repo / index.js View on Github external
<a rel="nofollow" href="{v.url}">
                      @{v.nameWithOwner || v.name}
                    </a>
                  
                );
              })
            ) : (
              <div>Loading...</div>
            )}
          
        
      
    );
  }
}
export default connect(
  state =&gt; ({
    ALL_REPOS: state.ALL_REPOS
  }),
  actions
)(GithubRepositories);

redux-zero

<h1 align="center"> <img src="https://i.imgur.com/S8jnr8O.png" height="300px" alt="redux zero logo" title="redux zero logo"> <br> </h1> <p align="center" style="font-size: 1.2rem;">A lightweight state container based on Redux</p>

MIT
Latest version published 4 years ago

Package Health Score

60 / 100
Full package analysis