Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>mUm-SnippetsNew to Visual Studio Code? Get it now.
mUm-Snippets

mUm-Snippets

Jory Liang

|
64 installs
| (0) | Free
Snippets for mUm
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

mUm Snippets

适用于 mUm 的 Snippets 插件

简介

mUm 中重新整合和 Redux 和 React,Action、Reducer 的写法都发生了很大的变化,由于是自建库也没有及时的文档和 IDE 支持,Snippets 插件将同步 mUm 更新,快速帮您创建 mUm 代码

快速添加 Snippets:

demo

当前 snippets 只在 JavaScript / TypeScript(包括 jsx,tsx) 文件中触发

依赖

当前只在 VSCode 1.18.0 中测试通过,其他版本尚未测试,如有疑问请给我们提交 issue

使用

通用

Trigger Content
imd import Module from path
ims import { Submodule } from path

mUm

Trigger Content Description
mma export const $1 = () => ({ apis, actions }) => Add a default mum action method with basal parameters
mmaf export const $1 = () => ({ apis, actions, constants }, dispatch, getState) => Add a default mum action method with entire parameters
mmrf module.exports = { ... } Initial a new reducers file
mmr KEY: (state, payload) => Add a default reducer method
mmap KEY: { path: ..., method: ... } Add a default interface of mum
mmpt static propTypes = { ... } Add a properties type to validate module with ES7 grammer
mmdp static defaultProps = { ... } Add default value of properties with ES7 grammer

已知问题

  • [ ] 缺少对 React 的支持
  • [ ] 缺少对 Redux 的支持
  • [ ] 缺少对 React-Router 的支持
  • [x] Snippets 在 JavaScript 文件中偶尔失效

更新日志

0.1.4

兼容 mUm 版本:

  • mum-react: 0.1.26

  • mum-script: 0.2.6

  • 修复了偶尔插件失效的问题

  • 添加了更多的 Snippets 描述

0.1.0

兼容 mUm 版本:

  • mum-react: 0.1.19
  • mum-script: 0.1.16

mum-snippets 首发!


更多

  • mUm 项目
  • 欢迎提 issue

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft