Closed pl12133 closed 4 years ago
@pl12133 Hi Peter, have you got any further with this? I'd like to help in any way I can to get this over the line.
+1 would love to see preact-i18n working with preactX
I'm glad to hear this PR is in demand! I'm going to take a look at the test cases today and once they pass this should be ready to merge and release as a beta.
It would be super helpful if people could check out this branch and try it in their own projects, and also try out the new useText
hook and see if any bugs come up.
Old and new tests are passing, this should be ready for review.
If anyone could try this out in their own applications and let us know about any issues that would be very helpful.
@pl12133 As soon as I get a chance to, I'll give it a try. At the moment I've found myself having to use i18next to keep the powers that be happy but I'll branch off an earlier commit and see how it goes.
Resolves https://github.com/synacor/preact-i18n/issues/41 and https://github.com/synacor/preact-i18n/issues/39.
This continues the upgrade to Preact X, moving away from legacy context into new context.
This will maintain the same interface while converting from legacy context to
createContext
. However this will be a breaking change in the case of directly accessingthis.context.intl
which will now beundefined
.