MithrilJS / mithril-node-render

Use mithril views to render server side
MIT License
210 stars 44 forks source link

Fix #71 Support component of class. #72

Closed alfa-jpn closed 7 years ago

alfa-jpn commented 7 years ago

Hi,

Fixes https://github.com/MithrilJS/mithril-node-render/issues/71. Support component type of class. (https://mithril.js.org/components.html#es6-classes)

best regards,

StephanHoyer commented 7 years ago

Hi @alfa-jpn

thanks, great work!

Can you please add a test that proves that state management works as expected and the constructor is not called again in redraw. Same goes for lifecycle hooks and embedded usage. I think it might work as expected, I only want to be sure it is.

Thanks in advance. Stephan

alfa-jpn commented 7 years ago

@StephanHoyer

Thanks for reply.

Sorry, Because I don't know much about inside of mithril, I had no idea how to test status management and redrawing.

So, I added only lifecycle and embedded tests.

best regards,

StephanHoyer commented 7 years ago

LGTM! Awesome work.

StephanHoyer commented 7 years ago

Just released v2.2.0 with your changes.