简体   繁体   中英

Issue facing with storybook for React Please guide me

i am new to React and facing this issue with storybook please help.

import React from 'react'
import Suc  from '../Input/Input'
import Success from '../Button/Button'


export default {
    title: "Form/Form",
    component: Success


};

export const SuccessForm = () => {
    <>
    <Suc />
    <Success />
    </> 
}

unboundStoryFn(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.

screenshot Attached.

https://i.stack.imgur.com/4H6gP.png

https://i.stack.imgur.com/QIJTO.png

export const SuccessForm = () => {
    <>
    <Suc />
    <Success />
    </> 
}

should be

export const SuccessForm = () => {
    return(
        <>
        <Suc />
        <Success />
        </> 
    )
}

let me know if it fixed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM