Giter Site home page Giter Site logo

Comments (4)

dvdzkwsk avatar dvdzkwsk commented on March 29, 2024

Hey, you're right - there is no way to provide initial state like this at the moment. It's something I've been meaning to get around to but just haven't; the server implementation could use quite a bit of love. So it's not that it's not necessary in this starter kit for some reason, I just haven't done it yet.

Sorry for the inconvenience; I'll make this a bigger priority and try to take a look at it early next week and see what can be done.

from react-redux-starter-kit.

mbrochh avatar mbrochh commented on March 29, 2024

Thanks for the quick answer! Good to know that I'm not totally stupid ;)

Your starter kit is awesome, I really like how it is structured. If you ever get around that de/re-hydration problem, I think this would be one of the best starter kits around.

from react-redux-starter-kit.

dvdzkwsk avatar dvdzkwsk commented on March 29, 2024

Hey @mbrochh, I added the ability to inject initial state; it's currently on the master branch: https://github.com/davezuko/react-redux-starter-kit/blob/master/server/index.js#L25-L32. It's not perfect and there's still some improvements I'd like to make to it, but one of the big things holding me up is the current structure of the app, since the server doesn't have direct access to the source code (it just consumes some convenience methods compiled from ~/client/entry-points/server).

Given this setup, I'm not sure how to go about solving your bonus question (in fact I've never even done this, so it's entirely new to me). I'll try to check out some other universal apps and see how they solve the issue, but this server configuration was intentional. In fact, one of the reasons I even built this starter kit was because I wanted to be able to use more of what Webpack has to offer (sass imports, for example), which is something that a lot of boilerplates just avoid altogether. So far the easiest solution is to just join that group and refactor the starter kit to only allow JS imports, but I'm not yet convinced it has to come to that, even though a better solution eludes me.

from react-redux-starter-kit.

dvdzkwsk avatar dvdzkwsk commented on March 29, 2024

Deferring to #71.

from react-redux-starter-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.