react-relay-network-layer icon indicating copy to clipboard operation
react-relay-network-layer copied to clipboard

Refactor into multiple packages

Open mattecapu opened this issue 7 years ago • 2 comments

Following #30, I think this module could provide just its core feature (support client-side middlewares for a Relay Network Layer) and then provide the built-ins middlewares as separated packages. It would be relatively straightforward to implement, improve architecture and bundle size.

I can take care of this too @nodkz

mattecapu avatar Dec 27 '16 12:12 mattecapu

I dislike an idea of many nano modules and polluting package.json. Almost all middlewares I'm using in my app.

But maybe core can be extracted to another package and all this middlewares keep here in one package.

Anyway I want to hear more thoughts...

nodkz avatar Dec 29 '16 04:12 nodkz

Personally, I use only urlMiddleware in production. It kind of bothers me having to use tree-shaking to exclude the other middlewares. It's the same philosophy of express, browserify, babel, and so on. The size of the project is smaller, but I think that as Relay grows this could become a focal package. Also it would help with issue tracking and semver. Much more flexibility.

mattecapu avatar Dec 29 '16 09:12 mattecapu