Choo v7.0.0 Release NotesRelease Date: 2019-06-12 // 6 months ago
It has been quite a while since the last major version of Choo. Since it's 🚀 release,
choo@6has recieved a bunch of features and patches, but some changes has been put off because they'd have an affect on the API in a way that could be 💥 breaking for some users. With this release we've merged all these minor, but 💥 breaking changes all at once.
The way in which Choo handles hashes in the URL has proved confusing for both 🆕 newcomers and seasoned Choo users. In a prior patch the
hashoption was added 🚀 which could be used to disable hash routing. With this release we're changing it 0️⃣ to be disabled by default.
🐎 Rendering pages server side is an excellent way to increase page performance and 👍 Choo supports it out of the box. Choo also allows for rehydrating the client with what state was used when rendering on the server side. To ensure that the application state is identicial regardless if hydrated or not, the internals for routing has been changes so that
routeare all available on application state at the time when stores are initialized.
In prior versions, when rendering on the server, the state that was provided to 🔀
toStringwould be merged onto the application state. Meaning consecutive calls to
toStringwould accumulate on the application state and persist in-between render. With this change, application state is no longer mutated during server side render. This will affects those of you doing server side rendering and then plucking out properties from the application state. You can now be assured that only the state that is provided to
toStringis modified during rendering.
var html = app.toString('/', state) - var title = app.state.title + var title = state.title
⚡️ And lastly, we've updated depndencies and even dropped a dependency which is 💻 no longer required by modern browsers. The dependency
xtendwas dropped in favour of 🌐 Object.assign. This change has also been propagated throughout 👷 the Choo universe i.e. choo-devtools and choo-service-worker etc. If you are 👌 supporting legacy browsers (IE11 and bellow), we recommend the polyfill service 💻 https://polyfill.io which will detect legacy browsers and load the appropiate polyfills.
That's all for now, keep being awesome!
Previous changes from v6.13.3
- ⏪ Revert changes to store init order