The serverState variable definition did not include the data node, which
may cause parsing errors on the client-side.
- add data: { } on line 23 within the apollo: { } object
* Updated for Apollo 2.0
* Updated for commit: ccb188a
* Simplified serverState
Updated with danistefanovic's comment. Looks better.
* Revert "Simplified serverState"
This reverts commit 1b543a35909dcfe401c753cb2f71760180087057.
* Simplified server
Updated with Statedanistefanovic's comment.
getToken is now deprecated, you'll get the following message if using the previous code:
firebase.User.prototype.getToken is deprecated. Please use firebase.User.prototype.getIdToken instead.
Prior to react-apollo 2.0 createNetworkInterface accepted the credentials option in {opt: {credentials: 'policy'}}. HttpLink accepts it as {credentials: 'policy'}.
This has never been working, we based our intl + locale lookups out of this example and found out when translations wasn't working on page transitions due to the fact that messages gets set to undefined because its trying to destruct in the incorrect level
* example with-noscript use next@latest
* fix : example/with-noscript react-dom/server usage
Since the update to react ^16.0.0 react-dom import location has changed
* [fix] with-apollo: Cannot read property 'data'
When we create the initial serverState, we need to create the
eventual construct of the Apollo Data to reside within
Later in the constructor this allows for the initApollo to either
be generated from SSR, or to init from scratch.
Fixes
> Cannot read property 'data' of undefined
> TypeError: Cannot read property 'data' of undefined
* [refactor] with-apollo: reduce init `serverState`
No need to explicitly set `data` as empty.
This trims up 4 lines. 😀️
* Updated dependencies related to Apollo and React.
* Updated libs with Apollo 2 new set of modules.
* Updated to Apollo 2 react integration modules.
* Updated withData to separate apollo state from the app's state.
* Updated dependencies related to Apollo and React.
* Updated libs with Apollo 2 new set of modules.
* Updated to Apollo 2 react integration modules.
* Updated withData to separate apollo state from the app's state.
* [chore] styled-jsx-plugin-sass@0.2.0, show dynamic
styled-jsx-plugin-sass had an update that now allows for sass and
dynamic to live together.
This updates that package and updates the example slightly to show how.
* [fix] errant space in styled-jsx-scss example
* Make styled-jsx configurable
* Add styled-jsx-plugin-postcss example
* Add styled-jsx 2.1.0 with plugins support
* Move examples around and add description
* Add link to new example
* Update babel-preset.js
As './dist/server/build/babel/preset' now return a function, in this example we need to first call the function and after that replace styled-jsx
* linting issues solved
* don't fetch messages server-side if user is not found
Currently, the component always fetch everything under '/messages' even if the user is not authenticated on the server side. Update it to not fetch if the user is not found as a better example on handling.
* fix lint error
* emotion v8 + adjustments for breaking changes
* Corrected versioning
* Take hydrate from 'react-emotion'
I was actually wondering that, but haven't seen hydrate in the medium post (even though you pointed out that react-emotion exports all of emotion and I've seen it in source) and didn't want to risk it for the off chance that it *should* be imported directly from emotion for some reason :D