Socket
Socket
Sign inDemoInstall

@cra-express/redux-prefetcher

Package Overview
Dependencies
8
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.3.2 to 5.0.0

7

package.json
{
"name": "@cra-express/redux-prefetcher",
"version": "4.3.2",
"version": "5.0.0",
"description": "Redux Prefetcher for prefetching on server",

@@ -15,3 +15,3 @@ "main": "lib/index.js",

"watch": "babel src -d lib --watch --ignore spec.js",
"test:ci": "jest --config=jest-config.json --coverage"
"test:ci1": "jest --config=jest-config.json --coverage"
},

@@ -26,4 +26,3 @@ "author": "Antony Budianto <antonybudianto@gmail.com>",

"react-router": "*"
},
"gitHead": "048e3373b3dd51d32956a749b87c594613661602"
}
}

@@ -1,3 +0,4 @@

# @cra-express/redux-prefetcher
# @cra-express/redux-prefetcher (deprecated)
> DEPRECATED! No support/PR accepted for this package anymore.
> Alpha stage, API may change, don't use on production yet!

@@ -7,2 +8,3 @@ > Simple utility to map your routes and prefetch your data on server using Redux as store

## Prerequisites
- Redux

@@ -13,2 +15,3 @@ - React Router with array config

## Start
```

@@ -19,2 +22,3 @@ npm i @cra-express/redux-prefetcher

## Use
```js

@@ -40,6 +44,6 @@ // server.js

// MyView.js
import React, { Component } from 'react'
import { connect } from 'react-redux'
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { fetchTodo } from './my-todo-reducer'
import { fetchTodo } from './my-todo-reducer';

@@ -51,3 +55,3 @@ class MyView extends Component {

// match is router match information, you can get params here
return store.dispatch(fetchTodo())
return store.dispatch(fetchTodo());
}

@@ -58,20 +62,19 @@

<ul>
{
this.props.todo.data.map((t, i) => (
<li key={i}>{t}</li>
))
}
{this.props.todo.data.map((t, i) => (
<li key={i}>{t}</li>
))}
</ul>
)
);
}
}
const mapStateToProps = state => ({
todo: state.todo
})
const mapStateToProps = (state) => ({
todo: state.todo,
});
export default connect(mapStateToProps)(MyView)
export default connect(mapStateToProps)(MyView);
```
## License
MIT
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc