Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 414 Bytes

react-style-helper.md

File metadata and controls

19 lines (16 loc) · 414 Bytes

How to write business block logic

// bundle relate logic together
const page = () => {
    //... some logic
    
    const { runAsync } = useRequest(serviceA,options);
    const handleEvent = () => {
        //...logic
        runAsync(params)
    }
    const someReactElement = <Component onEvent={handleEvent} />
    
    return <>
        { someReactElement }
        //... react component
    </>