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
  • Are there Action Creators?
  • Does Redux Resource require you to use a specific tool for making HTTP requests?
  • Should all Actions include a request key?
  • When is setting the mergeMeta action attribute to false useful?
  1. FAQ

Actions

PreviousState TreeNextLists

Last updated 5 years ago

Are there Action Creators?

Not in the core library.

When it comes to making requests, there is an .

Developers have different preferences when it comes to making requests, so we made this library easy to use with any library that you choose. We've had great success with the library linked to above, but should you choose to write your own, we have guides to help you.

Refer to the guide to learn more about how to build your own action creator, or the four CRUD guides for examples of action creators:

Does Redux Resource require you to use a specific tool for making HTTP requests?

No, you can use any system for making requests that you'd like. We do strongly encourage you to use a library that supports .

Should all Actions include a request key?

If you're manually coming up with the request keys, then it is typically extra boilerplate to always use them. In those situations, we recommend only using request keys when they provide you value.

Because request keys are used to make request objects within the store, anytime that you need a request object is when you should use a request key. The two most common use cases for request objects are:

  1. creating resources

  2. multiple bulk reads of the same resource type on the same page

If you're not doing either of those things, then you might not need to name the request, and that's fine.

When is setting the mergeMeta action attribute to false useful?

At the moment, we don't know of any use case for doing this. We included this attribute in the event that you find one – we're sure there's one out there!

A handy rule of thumb for when to use request objects, as well as much more information about requests, can be found in .

HTTP Action Creators library
Request Actions
Reading resources
Updating resources
Creating resources
Deleting resources
cancellation
Request Keys and Names guide