arc icon indicating copy to clipboard operation
arc copied to clipboard

reusable components

Open EricWVGG opened this issue 8 years ago • 6 comments

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?

EricWVGG avatar Jun 18 '17 20:06 EricWVGG

Not an issue for arc...

Call the fetch once, and loop the list. Same as PostList is doing it here in arc

Geczy avatar Jun 19 '17 13:06 Geczy

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.

EricWVGG avatar Jun 19 '17 13:06 EricWVGG

I've crashed into this problem ~~a second time~~ three times. I have the equivalent of five PostLists in a single page.

EricWVGG avatar Jul 13 '17 15:07 EricWVGG

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 avatar Aug 11 '17 19:08 EricWVGG

@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?

lightstrike avatar Sep 19 '17 23:09 lightstrike

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.

EricWVGG avatar Sep 20 '17 15:09 EricWVGG