MCPcopy
hub / github.com/kenberkeley/react-demo / isAddMode

Function isAddMode

src/components/Msg/MsgForm/index.js:12–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10/* 由于本组件由 /msg/add 与 /msg/:msgId 所公用
11 因此需要判断当前是“新增模式”还是“修改模式” */
12const isAddMode = pathname => pathname.startsWith('/msg/add')
13
14export default class MsgForm extends Component {
15 static contextTypes = {

Callers 2

updateStateMethod · 0.85
handleSubmitMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected