JesusTheHun / storybook-addon-remix-react-router

Use your app router in your stories. A decorator made for Remix React Router and Storybook
Apache License 2.0
48 stars 11 forks source link

fix(panel): restore -key- prop #43

Closed buberdds closed 1 year ago

buberdds commented 1 year ago

Hey, can we bring back key prop?

Reverts https://github.com/JesusTheHun/storybook-addon-react-router-v6/commit/6e129c7b57d212ecf5ceb65766be8291b076775c

When I upgrade to 2.0.0, Storybook throws

chunk-3FAXWWKG.js:3 Warning: Each child in a list should have a unique "key" prop.

Check the top-level render call using <Styled(div)>. See https://fb.me/react-warning-keys for more information.
    in pt
    in Unknown
    in Unknown
    in Unknown
    in Unknown (created by ManagerConsumer)
    in ManagerConsumer (created by Panel2)
    in Panel2 (created by Layout)
    in div (created by Styled(div))
    in Styled(div) (created by Panel)
    in Panel (created by Layout)
    in div (created by Styled(div))
    in Styled(div) (created by Main)
    in div (created by Styled(div))
    in Styled(div) (created by Main)
    in Main (created by Layout)
    in Layout (created by WithTheme(Layout))
    in WithTheme(Layout)
    in Unknown (created by App)
    in div (created by Styled(div))
    in Styled(div) (created by App)
    in App
    in ThemeProvider
    in Unknown (created by ManagerConsumer)
    in ManagerConsumer (created by Manager)
    in EffectOnMount (created by Manager)
    in Manager (created by QueryLocation)
    in QueryLocation (created by Main2)
    in Main2 (created by Root4)
    in Router (created by LocationProvider)
    in LocationProvider (created by Root4)
    in HelmetProvider (created by Root4)
    in Root4

when I bring back key prop warning disappears.

JesusTheHun commented 1 year ago

Hello @buberdds, starting with SB 7.2 we should not try to access the key property. I'm working on 2.0.1 that will fix it for both 7.1 and 7.2

JesusTheHun commented 1 year ago

@buberdds check v2.0.1