There's an old saying: April showers bring May flowers. Well, we don’t know much about flowers, though we hope this release will nurture your flourishing dapps! 🌼 We've spent the last few weeks improving Drizzle so your developer experience continues to be productive, efficient and fun.
Help us help you! 🤜🤛 It's the front-end's time to shine in the blockchain space and to that end, we'd appreciate getting your feedback both on Drizzle itself and the general state of dapp front-end dev through this brief survey.
What's new
Notable Improvements
- #190 fixes the error when applying options to send or call.
- Updated git flow for our contributors
- #147, #205 A better mechanism to coordinate with external services.
Improved Redux State Creation
📖 Docs: Using Drizzle's Redux Store
Drizzle is ideal for synchronizing contract state with a user interface, but as Dapps grow in complexity we foresee growing demand for coordination with off-chain services. Dapps now have the ability to more easily integrate with Drizzle's redux store for state management and event notification.
Specifically generateStore
can be configured to mange a Dapp's reducers and sagas for better state management, and it accepts redux middleware functions to handle use cases where the Dapp needs to integrate with other services based on Drizzle events. #147 is one compelling use case for this feature.
The New generateStore
API
generateStore
creates the Redux store by combining drizzleOptions, application reducers, sagas, and middlewares. You can pass these in via a configuration object.
Parameters:
config.drizzleOptions
- drizzle configuration object, requiredconfig.reducers
- application specific reducers, defaults to{}
config.appSagas
- application sagas, defaults to[]
config.appMiddlewares
- application middlewares, defaults to[]
config.disableReduxDevTools
- boolean to enable/disable Redux devtools hook, defaults tofalse
Return Value:
- A configured Redux
store
New Tutorial: Drizzle & Contract Events
👨🏫 Tutorial: Drizzle & Contract Events | Repository
To show off our new middleware capabilities, we've written a tutorial that uses Drizzle to show a toast notification when a smart contract event fires. Check it out!
Changelog
New Features
- Delegate concerns to Drizzle's store
Bug Fixes/Improvements
- #176 Configure Travis to target current and LTS versions of Node. (@DiscRiskandBisque)
- #182 Lock down Travis' Websocket dependency (@DiscRiskandBisque)
- #185 Git ignore yarn files (@guix77)
- #190 Handles web3 send and call options correctly. (@rawfalafel)
- #205 Feature/improve redux state creation. Fixes #147. (@cds-amal)