gakimball / react-inky

🦑 React components for Inky
https://gakimball.github.io/react-inky
MIT License
21 stars 10 forks source link

Exception while using <Center /> component #14

Closed mir3z closed 6 years ago

mir3z commented 6 years ago

Consider the following component:

const Foo = ({ children }) => (
    <Center>
        { children }
    </Center>
)

Then using it like that:

<Foo>Hello!</Foo>

In this case <Center /> will fail to render with TypeError: Cannot read property 'className' of undefined exception.

gakimball commented 6 years ago

What's the value of children? Sorry, that was a dumb question haha. It's early in the morning.

I'll look into it!

gakimball commented 6 years ago

Published a fix in 0.3.1

mir3z commented 6 years ago

Thanks for quick response.