LiveBy / react-leaflet-control

Dumb React component for creating Controls
ISC License
88 stars 24 forks source link

When page is rendering the control does not render.... #1

Closed Charmatzis closed 8 years ago

Charmatzis commented 8 years ago

I have insert a new control in the element like this ... `

` When I start the page for the first time the control does not render. When I do a small change in the code the control appears when the page is refreshing. Why is that?

Charmatzis commented 8 years ago

I search a little bit and I believe it is when it renders for the first time it return null, but if it is updated it calls the renderContent method which renders the component as it is.

jgimbel commented 8 years ago

Indeed. This needs to update in a componentDidMount function. I will update in a hour or so.

jgimbel commented 8 years ago

This commit resolved this issue for me. Let me know when you have confirmed.

Charmatzis commented 8 years ago

Yeap, problem solved. THX!!!!

aalpgiray commented 6 years ago

Hi, I know this is closed. But I am on version 2.0.0 and experiencing the same issue. It loads after only it hot reloads.