
Show HN: Nion, declarative API data management library built on Redux - meagher
https://github.com/Patreon/nion
======
duncan-donuts
I’m confused about the structure that is returned in the example. The
`currentUser` has data, actions, and response properties. How would you know
the shape of the values? Does nion have a concept of serializing the
responses? One thing I like about all of the boilerplate with redux is that it
allows you to manage the shape of all data within its life cycles. I’m just
missing how I could do that with this.

~~~
benbayard
Hey Duncan! I’m one of the nion maintainers. These are great questions! The
answer to this specific one is that currentUser follows the JSONAPI spec.
Which means we don’t really need to know the shape of the response, because
they’re all the same! We then normalize the data in nion so you can use it as
you expect. JSONAPI is not required for nion, you can use whatever you like
including REST. We have several adapters that come built in to nion, including
REST and JSONAPI.

------
acemarke
Nice. I'll have to poke through Nion's source a bit to see how it works.

FWIW, here's my lists of other existing similar libraries:

[https://github.com/markerikson/redux-ecosystem-
links/blob/ma...](https://github.com/markerikson/redux-ecosystem-
links/blob/master/component-data-fetching-preloading.md)

[https://github.com/markerikson/redux-ecosystem-
links/blob/ma...](https://github.com/markerikson/redux-ecosystem-
links/blob/master/entity-collection-management.md)

------
scottmf
I've been waiting for something like Apollo for Rest APIs. Looks interesting!

