Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

firebase-saga

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firebase-saga - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

examples/blog/sagas/index.js

2

package.json
{
"name": "firebase-saga",
"version": "1.0.4",
"version": "1.0.5",
"description": "A library for connecting Redux saga middleware to Firebase.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -12,1 +12,24 @@ # firebase-saga

```
## Connecting to Sagas
The saga can be like the following:
```
import { takeEvery } from 'redux-saga';
import * as actions from '../actions';
import * as firebaseRef from 'firebase-saga';
function* fetchPosts() {
const posts = yield call(firebaseRef.get, 'posts');
if (posts) {
yield put(actions.receivePosts(posts);
} else {
yield put(actions.requestGetPostsFailed());
}
}
function* get() {
yield* takeEvery(fetchPosts);
}
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc