-
Notifications
You must be signed in to change notification settings - Fork 27
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
server rendering #39
server rendering #39
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very good!
server. The server then sends the right HTML to the client, so the first render | ||
happens instantly. | ||
|
||
Choo was built with both Node and the Browser in mind. One of its main feature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
features
There hasn't been too much going on so far. Instead of rendering to the DOM, | ||
we've been creating strings instead. However, what's often the case with server | ||
rendering is that you need some data passed in for your initial rendering. | ||
Luckily the `.toString()` method accepts a seonc argument: `state`. Let's see |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
second
a slightly different approach. | ||
|
||
```js | ||
var choo = require('choo') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't it supposed to use import
here then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol yup
46a7b5e
to
4bd0e9c
Compare
Wrote a bunch about server rendering. Figured we should just cover the basics first, as we don't quite have a story for async rendering. Hope this works out alright!