yahoo / react-i13n

A performant, scalable and pluggable approach to instrumenting your React application.
Other
382 stars 42 forks source link

`createI13nNode` components accept unused `i13n` prop #565

Open chrissantamaria opened 1 year ago

chrissantamaria commented 1 year ago

👋 was poking around in this package's internals and noticed that components returned by createI13nNode seemingly accept an i13n prop in addition to i13nModel:

https://github.com/yahoo/react-i13n/blob/aa16b9477220be5da01d42dcca17970a4b2e705d/src/core/createI13nNode.jsx#L41-L54

From what I can tell, this is only used to construct i13nProps which is eventually passed to CoreComponent. However, it's seemingly unused in there:

https://github.com/yahoo/react-i13n/blob/aa16b9477220be5da01d42dcca17970a4b2e705d/src/components/core/CoreComponent.jsx#L22-L32

Out of curiosity, is this prop supported / does it functionally do anything? It's not mentioned on the docs for createI13nNode, so I assume it's leftover. If that's the case, I'm happy to take a stab at cleaning it up :)

redonkulus commented 1 year ago

@roderickhsiao any thoughts here?

roderickhsiao commented 1 year ago

I think it's from migrating from old logic to new one (we support i13n on previous major version), but probably removed in this version