jenseng / react-i18nliner

translate="yes" all the things
MIT License
45 stars 15 forks source link

Make ComponentInterpolator a pure functional component #31

Closed jwodicka closed 7 years ago

jwodicka commented 7 years ago

This resolves #30 with what's perhaps a larger change than strictly needed - since ComponentInterpolator doesn't require internal state, the current recommended approach is to make it a pure functional component.

In order to do that, I also needed to change how we validated tests against it, because the method we were using doesn't work when applied to pure functional components.

This change also deletes all dead code that I'm aware of creating with the other two changes.

jenseng commented 7 years ago

This is fantastic, thanks! 👍