@21epub/resource-lib 中文文档教程
resource-lib
Usage
import React from 'react'
import {
AssetsRecoilRoot,
AssetsModal,
useAssetsModalState,
} from '@21epub/resource-lib'
const Button = () => {
const [assetsModalState, dispatch] = useAssetsModalState({
visible: false,
type: 'image',
})
return (
<button onClick={() => dispatch({ visible: !assetsModalState.visible })} />
)
}
const App = () => (
<AssetsRecoilRoot>
<AssetsModal getPath={() => ''} />
<Button />
</AssetsRecoilRoot>
)
export default App
resource-lib
Usage
import React from 'react'
import {
AssetsRecoilRoot,
AssetsModal,
useAssetsModalState,
} from '@21epub/resource-lib'
const Button = () => {
const [assetsModalState, dispatch] = useAssetsModalState({
visible: false,
type: 'image',
})
return (
<button onClick={() => dispatch({ visible: !assetsModalState.visible })} />
)
}
const App = () => (
<AssetsRecoilRoot>
<AssetsModal getPath={() => ''} />
<Button />
</AssetsRecoilRoot>
)
export default App
更多
你可能也喜欢
- @0notole/elements.css 中文文档教程
- @2bitlab/router 中文文档教程
- @58fe/log-plugins 中文文档教程
- @aapzu/tsdotenv 中文文档教程
- @abi-software/mapintegratedvuer 中文文档教程
- @abp/ng.identity.config 中文文档教程
- @abukodonosor/unit 中文文档教程
- @acollier/eslint-config 中文文档教程
- @acoustic-content-sdk/redux-feature-url-config 中文文档教程
- @activfinancial/record-viewer 中文文档教程