Comments (3)
Hey @nasushkov thanks for this! Let me go through each of these.
- I'd suggest react-helmet as a more convenient way to manage page head
- This looks very interesting! Want to make a PR? I'm not sure what the benefits are over react-document-meta?
- It also would be nice to add react-intl support for internationalization
- In my experience with INTL support, implementations can be forced based on business requirements and so it would be hard to find a simple solution that meets everyone's requirements. I'll certainly have a play with this though! It could definitely help for big apps if done well!
- You have a socket.io support included in this boilerplate. There is no need for socket.io in my case. Is it necessary for any infrastructure to work properly (I mean hot-reload first of all)?
- Nope! You can remove it completely, all the hot reloading logic is handled within the hotReload file. The only infrastructure requirements are some dependency injection happening in the server.
- Your koa server setup is spread across several files (partly in app.js, partly in start.js). So at the first time it's hard to grasp, what is happening here. Maybe it would be better to move koa app setup code to app.js file and leave at start.js only isomorphic tools configuration
- This is very much on purpose!
- The scripts/start.js command hosts the root of hot reloading logic because it needs to sit outside of hotreloads to keep a single app instance.
- Src/server/index.js hosts the app initialisation... this is so it can be tested! The tests plug in test routes to make sure this app middleware is configured correctly (error handling, compression, session)
- Src/server/index.js is used to test in conjunction with Src/server/router.js... this is also for hot reloading of routes.. the router provides a function that assets can be injected into as well as allowing the makeRoutes function to be stubbed and hot reloaded. I've wrote a blog article about the hot reloading here: https://tomatao-blog.herokuapp.com/ "Server and CSS Hot Updates"
from breko-hub.
Thanks, Thomas, Your blog post clarifies a lot. React-helmet plays as a react-component so you can change page data on the client. For example, I use it for locale switching. I'll try to make a PR if it's ok
from breko-hub.
Glad to hear it helped!
we're already using react-document-meta which does the same!
from breko-hub.
Related Issues (20)
- Version 10 of node.js has been released HOT 1
- Windows path bug in css-modules HOT 11
- Semantic UI icon fonts displayed as squares HOT 2
- Mocha doesn't terminate HOT 3
- Serverside redux+socket example HOT 2
- An in-range update of react is breaking the build 🚨 HOT 2
- An in-range update of babel7 is breaking the build 🚨 HOT 2
- How to disable server-side rendering? HOT 5
- Preloading data from backend before SSR HOT 4
- How to edit the expected server-side state? HOT 6
- Update react-helmet HOT 1
- An in-range update of eslint is breaking the build 🚨 HOT 5
- Implement review apps HOT 1
- An in-range update of chokidar is breaking the build 🚨
- An in-range update of eslint-plugin-react is breaking the build 🚨
- An in-range update of webpack is breaking the build 🚨
- An in-range update of sinon is breaking the build 🚨
- An in-range update of enzyme-to-json is breaking the build 🚨
- An in-range update of eslint-plugin-react is breaking the build 🚨
- An in-range update of url-loader is breaking the build 🚨
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from breko-hub.