• Stars
    star
    1,646
  • Rank 28,392 (Top 0.6 %)
  • Language
    JavaScript
  • License
    Other
  • Created almost 10 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Async rendering & data-fetching for universal React applications.

React Resolver https://img.shields.io/npm/v/react-resolver.svg

Async-rendering & data-fetching for universal React applications.

React Resolver lets you define data requirements per-component and will handle the nested, async rendering on both the server & client for you.

For example, the following will load & provide this.props.user for the UserProfile component:

import { resolve } from "react-resolver";

@resolve("user", function(props) {
  return http.get(`/api/users/${props.params.userId}`);
})
class UserProfile extends React.Component {
  render() {
    const { user } = this.props;
    ...
  }
}

This is the equivalent to asynchronously loading user and providing it to the component as if it were provided directly:

<UserProfile user={user} />

This makes components pure, stateless, and easy to test as a result.


Installation

For environments that don't have native Promise support, install ES6 Promise.

$ npm install --save react-resolver

For React v0.13 support, install v2.x.x.

$ npm install --save react-resolver@2

Documentation

Complete documentation can be found here:

http://ericclemmons.github.io/react-resolver/


Development

If you'd like to contribute to this project, all you need to do is clone this project and run:

$ npm install
$ npm test

Contributors

License

Internet Systems Consortium license

Copyright (c) 2015 Eric Clemmons

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Collaboration

If you have questions or issues, please open an issue!

More Repositories

1

click-to-component

Option+Click React components in your browser to instantly open the source in VS Code
TypeScript
1,710
star
2

grunt-angular-templates

Grunt build task to concatenate & pre-load your AngularJS templates
JavaScript
712
star
3

webpack-hot-server-example

Webpack Hot Module Replacement (HMR) Example with Express
JavaScript
367
star
4

polydev

Faster, route-centric development for Node.js apps with built-in Hot Module Replacement.
JavaScript
284
star
5

unique-selector

Given a DOM node, return a unique CSS selector matching only that element
JavaScript
260
star
6

grunt-express-server

Grunt task for running an Express Server that works great with LiveReload + Watch/Regarde
JavaScript
248
star
7

terse-webpack

Simplified, fluent Webpack API with presets. Describe *what* your app needs, not *how*.
JavaScript
215
star
8

start-server-webpack-plugin

Automatically start your server once Webpack's build completes.
JavaScript
158
star
9

grunt-react

[DEPRECATED] Grunt task for compiling Facebook React's .jsx templates into .js
JavaScript
151
star
10

per-env

Clean up your package.json with per-NODE_ENV npm scripts
JavaScript
133
star
11

genesis-skeleton

Modern, opinionated, full-stack starter kit for rapid, streamlined application development.
CoffeeScript
106
star
12

if-env

Simplify npm scripts with `if-env ... && npm run this || npm run that`
JavaScript
97
star
13

node-recorder

Simple recording & replaying of HTTP requests for predictable development & testing.
TypeScript
97
star
14

jinja.js

Twig/Jinja/JinJS Client-Side Templating + jQuery Plugin
JavaScript
76
star
15

mdx-site

Static site generator powered by TypeScript, MDX, & React.
TypeScript
51
star
16

next.js-conf-2020

From Front-end to Full Stack with Amplify Framework
JavaScript
38
star
17

reload-server-webpack-plugin

Webpack plugin that automatically (re)starts your server between builds.
JavaScript
38
star
18

bookshelf-manager

Easily wire up models to APIs with supported for complex, nested saving.
JavaScript
34
star
19

universal-webpack

Library to greatly simplify running, watching, testing, & deploying universal apps with webpack.
JavaScript
34
star
20

medium-to-markdown

Convert Medium URLs to Markdown
JavaScript
30
star
21

mvc-to-react

Eric Clemmons' Space City JS 2015 talk – "Moving from MVC to React"
JavaScript
30
star
22

angular-github-demo

AngularJS demo application for HoustonJS
CSS
26
star
23

tech-2016-lightning-talks

10-minute lightning talks about Storybook, Styled Components, MobX, & Jest.
JavaScript
26
star
24

react.lazy-example

Testing out React.lazy (https://github.com/facebook/react/pull/13398)
JavaScript
24
star
25

grunt-angular-modularize

Write AngularJS Modules Once. Build with RequireJS (AMD), Browserify (CommonJS), or simply concat.
JavaScript
23
star
26

hot-module

Reload changed files in Node *without* restarting the server (like nodemon/piping/etc.)
JavaScript
23
star
27

github-semantic-version

Automated semantic version releases powered by Github Issues.
JavaScript
21
star
28

ECVagrantBundle

Symfony2 bundle to generate a working PHP5.3+ Vagrant environment
PHP
21
star
29

codelift

Visual Development for React, Next.js, & Tailwind CSS
17
star
30

de-pagify

Bookmarklet to enable "endless scroll" on popular sites
PHP
16
star
31

performant-3rd-party-widgets

Houston.js demo + slides for babel/webpack/react bundling & optimizations.
JavaScript
15
star
32

diez

Incredibly simple, Dependency Injection for isomorphic Javascript applications.
JavaScript
14
star
33

jest-storybook

Generate Jest snapshots from existing storybooks (similar to storyshots).
JavaScript
13
star
34

react-tooling-challenge

Competition to improve the tooling landscape for all React users.
13
star
35

eslint-config-future

ESLint Shareable Config for ES5/ES6/ES7 Javascript
JavaScript
12
star
36

wordpress-skeleton

[DEPRECATED] Dude, use https://github.com/genesis/wordpress/ !!
PHP
12
star
37

react-router-server-location

A React Router Location for universal apps.
JavaScript
12
star
38

start-cluster

Start a Node cluster by simply running `start-cluster`
JavaScript
11
star
39

graphql-context-services

GraphQL example using Context & Services
JavaScript
11
star
40

graphql-demo

Introduction to GraphQL (http://www.meetup.com/NodejsHouston/events/229815892/)
JavaScript
11
star
41

create-preact-pwa

"yarn create"-friendly version of preact-cli
JavaScript
9
star
42

grunt-verbosity

Adjust verbosity for individual grunt tasks
JavaScript
8
star
43

mootools-namespace

Allows Classes to specify namespace ("My.Fx.Accordion") and extend "Moo.Fx.Accordion", similar to Dojo.provide/require
JavaScript
6
star
44

tech-screen-template

Opinionated (but customizable!) template for tech screen interviews
TypeScript
6
star
45

express-hot-middleware

Simple way to enable hot-reloading in your Express applications.
JavaScript
6
star
46

babel-plugin-react-pure-to-class

https://github.com/gaearon/babel-plugin-react-transform/issues/57#issuecomment-167652102
JavaScript
5
star
47

graphql-mock-object

Easily prototype UIs with dynamic GraphQL objects
JavaScript
5
star
48

amplify-visor

Amplify Visor is a prototype GUI that customers run locally that streamlines the Amplify app-building experience – configuring & deploying Amplify visually, automatically installing dependencies, and reducing developer friction.
JavaScript
5
star
49

sync-github-pivotal

Bi-directional syncing between Pivotal Tracker & GitHub Issues
TypeScript
4
star
50

generator-genesis

Yeoman Generator for Genesis Skeleton
JavaScript
4
star
51

redux-reconnect

Redux hooks for React Resolver & Server-Side Rendering via "reconnect(...)"
3
star
52

create-graphql-app

Add an Amplify Function to `create-react-app`.
JavaScript
3
star
53

begin-react-app

Begin app
JavaScript
2
star
54

react-zones-example

Can Zones magically simplify SSR? http://blog.kwintenp.com/how-the-hell-do-zones-really-work/
2
star
55

vagrant-php

Instantly setup & launch PHP5.x Vagrant machine
PHP
2
star
56

vagrant-shim

Transparently run commands through your Vagrant VM.
PHP
2
star
57

sublime-typescript

DEPRECATED - Use Microsoft's official plugin instead!
2
star
58

ericclemmons

MDX
2
star
59

ericclemmons.com

TypeScript
2
star
60

amplify-flow

Native app for GitHub issue management for Amplify JS
TypeScript
2
star
61

ericclemmons.github.io

Official (Dynamic) Website of Eric Clemmons
CSS
2
star
62

zend-memcached-namespaced

Zend_Cache_Backend_Memcached with Namspace support for clearing specific keys
1
star
63

react-shared-state

Simple <SharedState> component to wrap your app & auto-inject Redux & MobX stores.
1
star
64

angular-lazy-load

Experimenting with lazy-loading angular.modules
JavaScript
1
star
65

microbundle-monorepo

Having an issue with CSS not being extracted when part of a monorepo
CSS
1
star
66

flummox-parent-promise

JavaScript
1
star
67

css-system

JavaScript
1
star
68

genesis-skeleton.com

Official website of Genesis Skeleton
CoffeeScript
1
star
69

mobx-resolver

Prefect MobX data dependencies before rendering React components.
1
star
70

redux-devtools-visual

Easily scrub through a visual history of your application, branch, and repeat!
1
star
71

amplify-js-canary

Canary releases for https://github.com/aws-amplify/amplify-js
1
star
72

amplify-js-issues-4506

https://github.com/aws-amplify/amplify-js/issues/4506
HTML
1
star
73

capistrano-svn-deployment

Example deployment script using Python & Capistrano for PHP apps in SVN
Python
1
star
74

ng-gitboard

Github dashboard powered by Angular.
JavaScript
1
star
75

redux-server

Redux-powered server & middleware for predictably handling requests with immutable responses.
1
star
76

ericclemmons.github.com

Office (Static) Website of Eric Clemmons
1
star