This commit is contained in:
2024-04-30 07:08:23 +02:00
commit a711247971
2043 changed files with 16874 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
# -*- mode: snippet -*-
# uuid: 68de6229-17f5-4bd6-83ef-feaa3a1ccb31
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
# name: hocComponentWithRedux
# key: hocredux
# --
import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
export const ${1:hocComponentName} = (WrappedComponent) => {
const hocComponent = (props) => <WrappedComponent {...props} />
hocComponent.propTypes = {
}
return hocComponent
}
const mapStateToProps = (state, ownProps) => ({
})
const mapDispatchToProps = (dispatch, ownProps) => ({
})
export default WrapperComponent => connect(mapStateToProps, mapDispatchToProps)(${1:hocComponentName}(WrapperComponent))