reusable components
I have a project that requires reusable components… they look something like this:
<Article id="1" /><Article id="2" />
Obviously the reducer logic updates both components with the latest API call.
I have found a promising guide to encapsulating logic here — https://www.codementor.io/nwugurusunday/implement-a-reusable-reducer-logic-5eqjahjum — but the store is handled completely differently than ARC.
As a beginner, I'm a bit stumped. Am I overlooking something built-in? Is there a more correct way to accomplish this?
Not an issue for arc...
Call the fetch once, and loop the list. Same as PostList is doing it here in arc
The articles are not in a series like a blog. Its a bit more ad hoc like a magazine.
`<Article id="1"/><SomeOtherContentType id="1"/><SomethingElse id="123"/><Article id="2"/>
Something like that
/taptapswipe
On Jun 19, 2017, at 9:23 AM, Matt Gates [email protected] wrote:
Not an issue for arc...
Call the fetch once, and loop the list. Same as PostList is doing it here in arc
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
I've crashed into this problem ~~a second time~~ three times. I have the equivalent of five PostLists in a single page.
Has anyone tried using redux-subspace with ARC? Looks promising, but I'm unclear on how to adapt the reducers.
https://github.com/ioof-holdings/redux-subspace
@EricWVGG I'm working on implementing reusable components with ARC as well and have investigated redux-subspace, but have not tried it yet. Have you made any progress?
Nope. I’m just got a dozen different stores for various purposes. It’s a mess.
On Sep 19, 2017, at 7:43 PM, lightstrike [email protected] wrote:
@EricWVGG I'm working on implementing reusable components with ARC as well and have investigated redux-subspace, but have not tried it yet. Have you made any progress?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.