Skip to content
This repository has been archived by the owner on Sep 27, 2019. It is now read-only.

v1.4.0 - improved redux store configuration, bug fixes and more

Latest
Compare
Choose a tag to compare
@cds-amal cds-amal released this 05 Apr 19:28
· 58 commits to develop since this release
13b183d

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

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, required
  • config.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 to false

Return Value:

  • A configured Redux store

New Tutorial: Drizzle & Contract Events

👨‍🏫 Tutorial: Drizzle & Contract Events | :octocat: 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!

Watch the video

Changelog

New Features

  • Delegate concerns to Drizzle's store

Bug Fixes/Improvements