@sialvsic/react-redux

0.0.2 • Public • Published

react-redux-analyze

This repo aim to analyze react-redux and DIY it.

React redux 核心组成

  • Provider
  • connect
const rootElement = document.getElementById('root')
ReactDOM.render(
  <Provider store={store}>
    <App />
  </Provider>,
  rootElement
)
const mapStateToProps = (state /*, ownProps*/) => {
  return {
    counter: state.counter
  }
}

const mapDispatchToProps = { increment, decrement, reset }

export default connect(
  mapStateToProps,
  mapDispatchToProps
)(Counter)

Teach Path

How to publish to npm

npm publish --access public
npm unpublish @sialvsic/react-redux@0.0.1 -f

How to publish in local with verdaccio

npm publish --registry http://localhost:4873

P.S could install from local by adding this line in the .npmrc file

registry=http://localhost:4873

Readme

Keywords

none

Package Sidebar

Install

npm i @sialvsic/react-redux

Weekly Downloads

0

Version

0.0.2

License

ISC

Unpacked Size

3.22 kB

Total Files

5

Last publish

Collaborators

  • sialvsic