jamesplease / jamesplease/react-redux-resource

API idea: object instead of <Fetch/> for configuring requests

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

I was thinking people might find it weird to pass a `` as a prop to ``. Maybe it would be less weird if they passed the props as an object instead?

With Fetch:

```jsx
function thing() {
return (
}
render(({ status, data }) => {
{status.pending && }
{status.failed && }
{status.succeeded && }
} />
);
}
```

with object props:

```jsx
function thing() {
return (
{
{status.pending && }
{status.failed && }
{status.succeeded && }
} />
);
}
```

It would do the exact same thing under the hood, but people may prefer it. You could also pass `` if you wanted.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the existing and request APIs and how the request prop is handled. Determine whether object props can produce the same behavior while preserving support, then verify the examples for both forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.