tonyhb / tectonic

A declarative REST data loader for React and Redux. Docs @

Home Page:https://tonyhb.github.io/tectonic/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discovered APIs

dentuzhik opened this issue · comments

First of all, I think the concept is wonderful, keep up the great work.
While dealing with REST and Redux, I've also ended up writing abstractions on top of data fetching actions, to make everything more consistent, but didn't quite get to the component decorator yet :).

I would be really glad to swap my implementation with tectonic, I tried to go through docs to find some answers to my questions, but couldn't find them, so posting them here:

  1. Is there any way to handle discovered API resources? The implicit way of defining dependencies is cool, but let's say the whole URL of the next request is unavailable before the first request continues?
// GET http://some-url
{
    "href": "http://some-other-url"
}

// GET http://some-other-url
{
    "href": "http://some-yet-another-url"
}

// ...etc

I've solved it currently with ability to chain action creators, but they are defined explicitly.

  1. Let's say I want to handle the network related action in my reducer, is there any way of doing this? I understand, that most of the times having abstraction like this will solve that issue, but in case of migration f.e. migrating some existing logic might be not very straightforward all at once.

  2. Is there any way to normalize data somehow?

Thanks!