tleunen / react-mdl

React Components for Material Design Lite
https://tleunen.github.io/react-mdl/
MIT License
1.76k stars 255 forks source link

Importing Drawer with another name breaks the Drawer #430

Closed mattmichler closed 7 years ago

mattmichler commented 7 years ago

I am creating a component named Drawer in my app that imports the react-mdl Drawer component so I tried to do: import { Drawer as mdlDrawer } from 'react-mdl'

Importing and rendering happened but not properly. I think what happens is the material.js that hooks up drawers couldn't find the element, but that's a guess. What I've done as a work around is named my component Drawer_ and just import Drawer from react-mdl the typical way.

kradio3 commented 7 years ago

I cannot reproduce it with react-mdl@1.9.0 see Gist

mattmichler commented 7 years ago

I forgot JSX treats lowercase tags as html... embarrassing.