Redux Resource
  • Home
  • Introduction
    • Motivation
    • Core Concepts
    • Similar Projects
    • Examples
  • Resources
    • Resource Reducers
    • Resource Objects
    • Meta
    • Lists
    • Modifying Resources
  • Requests
    • Request Objects
    • Keys
    • Names
    • Statuses
    • Request Actions
      • Updating Lists
      • Reading Resources
      • Updating Resources
      • Creating Resources
      • Deleting Resources
  • Other Guides
    • Usage With React
    • Tracking Request Statuses
    • Using Request Statuses
    • Custom Action Types
    • Migration Guides
  • Recipes
    • Forms
    • Canceling Requests
    • Unauthorized Responses
    • User Feedback
    • Related Resources
    • Caching
  • Ecosystem Extras
    • Redux Resource Action Creators
    • Redux Resource XHR
    • Redux Resource Prop Types
    • Redux Resource Plugins
      • HTTP Status Codes
      • Selection
      • Reset
      • Included Resources
  • FAQ
    • General
    • State Tree
    • Actions
    • Lists
  • API Reference
    • resourceReducer
    • getStatus
    • getResources
    • upsertResources
    • setResourceMeta
    • actionTypes
    • requestStatuses
Powered by GitBook
On this page
  • Read Resource
  • Lists and Named Requests
  • "Real World" Examples
  1. Introduction

Examples

PreviousSimilar ProjectsNextResources

Last updated 7 years ago

A number of examples are distributed with the library's .

Read Resource

To run this example:

git clone https://github.com/jamesplease/redux-resource.git

cd redux-resource/examples/read-resource
npm install
npm start

open http://localhost:3000/

This example shows what the most basic usage of Redux Resource looks like. Two differences between a real-world application and this example are:

  • A real-world application would likely use the performant bindings for re-rendering.

  • A real-world application would likely use so that it could have multiple resources in its state tree.

Lists and Named Requests

To run this example:

git clone https://github.com/jamesplease/redux-resource.git

cd redux-resource/examples/lists-and-named-requests
npm install
npm start

open http://localhost:3000/

This example shows how you can use request objects to track requests that don't target a specific resource ID. It also shows you how lists can be used to display two different ordered subsets of the same type of resource.

In this example, a user's owned books are fetched, then displayed in a list on the interface. At the same time, a list of recently released books are also fetched, and displayed in another list in the interface.

"Real World" Examples

This is a list of open-source projects that are using Redux Resource.

Do you have an open source project that uses Redux Resource that you would like to add to the list? Open an issue or make a Pull Request!

A real-world application would likely use the performant bindings for re-rendering.

: A desktop client for JIRA.

: A simple recreation of the GitHub Gists webapp.

source code
React Redux
combineReducers
React Redux
Chronos Timetracker
Zero boilerplate redux