Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from 'react'
import actionCreators from '../redux/actions'
import connect from 'react-redux/lib/components/connect'
import { Footer } from 'app/layout'
import { Button, Icon } from 'antd-mobile'
import 'themes/global'
@connect(
state => ({
article: state.article
}),
dispatch => ({
postArticle: (options) => dispatch(actionCreators.postArticle(options))
})
)
class Comp extends React.Component {
componentDidMount() {
this.props.postArticle({
data: {
title: 'the title'
}
})
this.refs.footer.tab = this.props.location.pathname