unctx:van Vanilla JS中的Composition-api

时间:2021-04-01 15:36:28
【文件属性】:
文件名称:unctx:van Vanilla JS中的Composition-api
文件大小:108KB
文件格式:ZIP
更新时间:2021-04-01 15:36:28
TypeScript :soft_ice_cream: 联合会 Vanilla JS中的Composition-api 它是什么? 引入了一种令人惊叹的模式,称为 ,该模式可以通过将复杂的逻辑拆分为可重用的功能并按逻辑顺序进行分组来组织逻辑。 unctx允许您轻松地在JavaScript库中实现composition api模式。 一体化 在您的超赞库中: yarn add unctx # or npm install unctx import { createContext } from 'unctx' const ctx = createContext ( ) export const useAwesome = ctx . use // ... ctx . call ( { test : 1 } , ( ) => { // This is similar to vue setup function // Any funct
【文件预览】:
unctx-main
----.eslintrc(62B)
----.github()
--------workflows()
----yarn.lock(256KB)
----src()
--------index.ts(1KB)
----tsconfig.json(139B)
----LICENSE(1KB)
----test()
--------index.test.ts(1011B)
----jest.config.js(66B)
----README.md(4KB)
----renovate.json(37B)
----.editorconfig(224B)
----.gitignore(52B)
----CHANGELOG.md(775B)
----.eslintignore(18B)
----package.json(856B)

网友评论