Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

separate into npm module and example project #626

Closed
wants to merge 56 commits into from

Conversation

bdefore
Copy link
Collaborator

@bdefore bdefore commented Nov 27, 2015

This PR removes the base 'starter' parts of this example repo (i.e. webpack configuration, serverside rendering, routing) and leaves just the project code (i.e. example redux flow, api, css modules, theming, chat).

It's able to function without the rest of the code because I've created another branch, npm-module (https://github.com/bdefore/react-redux-universal-hot-example/tree/npm-module) which is publishable as an npm module that you can then declare as a dependency in the example project or projects from scratch. For the meantime, I've also put it up here with a README https://github.com/bdefore/redux-universal-renderer and published it on npm as redux-universal-renderer

Why make an npm module? Developers who base their projects on this repo have suffered from the following issues, that I think would be alleviated by this change:

Very curious to hear what you guys think!

@bdefore
Copy link
Collaborator Author

bdefore commented Nov 27, 2015

Since there's not a lot of change other than deletions in this branch, it's probably easier to read through the diff on the npm-module branch. Here's the comparison: https://github.com/erikras/react-redux-universal-hot-example/compare/master...bdefore:npm-module?expand=1

@snackycracky
Copy link
Contributor

very interesting.

@bdefore
Copy link
Collaborator Author

bdefore commented Dec 4, 2015

@quicksnap no problem, looking forward to your feedback.

by the way, i think it was a mistake to bring the api logic into the npm module, since it should be focused just on universal rendering. i'm going to remove it from there and bring it back into the example-project branch. please hold off on merging until then.

@bdefore
Copy link
Collaborator Author

bdefore commented Dec 5, 2015

@quicksnap ok, api is now back in the example-project branch

@bdefore
Copy link
Collaborator Author

bdefore commented Dec 7, 2015

The npm module is now universal-redux. 9 syllables was too much.

@bdefore
Copy link
Collaborator Author

bdefore commented Dec 10, 2015

I've opened another PR #685 that takes a similar approach to here, using universal-redux at version 1.0.0-beta1 to support using redux-simple-router. Given that it sounds like this project is considering moving there, I think it's probably appropriate to close this PR and continue discussion there.

If anyone would prefer to continue using redux-router, they can map their dependency at version ^0.16

@quicksnap
Copy link
Collaborator

Once again, I got caught up and didn't get a chance to look at this. I'm going to try to review in a few hours.

Does anyone else have feedback so far?

@msikma
Copy link
Contributor

msikma commented Dec 29, 2015

This seems very interesting. Haven't had a look at it yet but the idea behind this seems like the right way forward. Gonna have a look soon.

@catamphetamine
Copy link
Contributor

Is redux-router really done?
I saw some of the old issues being closed recently.

As for the movement towards an npm package - that's a must.
This project started loosing popularity because it became too complex.
Not a single newcomer will be able to wrap one's mind over all these piles of code.

Where the demarkation line should be drawn is another question.
Obviously noone wan't to know about Webpack weirdness and all the moving parts, that's for sure.
Ideally an average user would like to have a sinlge "DO IT" button to push to start his own project based on this boilerplate.
In this sense this universal-redux thing may be the way to go for the project owners.
It needs to be Rails-alike kind of thing.

@msikma
Copy link
Contributor

msikma commented Dec 31, 2015

There are bound to be different answers to the question of where the line should be drawn, based on the person answering it. It's hard to imagine a single optimal Webpack config that works for everybody but just how much someone would want to deal with it depends on their use case.

Then again as I'm writing this I realize this is a pretty comprehensive discussion, not really something for this PR. Basically what would be a major version bump that totally changes the nature of the project :) If the intention is to make a sort of general purpose universal renderer for a specific React/Redux-based setup, it's also conceivable to rename it from "universal-hot-example".

@catamphetamine
Copy link
Contributor

@msikma Yes, the setup has to be specific (or choosable from a finite set of predefined options). That's the only possible way to do it.

@msikma
Copy link
Contributor

msikma commented Dec 31, 2015

I think in the end there could be a pretty decent amount of flexibility given that we'd generate the Webpack config and other things in JS. So it wouldn't be that bad. We could cover a range from simple websites to optimized larger applications if we let the user handle a few things by themselves such as routing. There's lots of different tradeoffs that could be made.

@bdefore
Copy link
Collaborator Author

bdefore commented Jan 16, 2016

I'm going to close this PR as it's superseded by #759 Please direct any further comments over there.

@bdefore bdefore closed this Jan 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants