synacor / preact-i18n

Simple localization for Preact.
BSD 3-Clause "New" or "Revised" License
205 stars 18 forks source link

Doesn't work with preact 10.0.0-beta.2 #34

Closed HolyWalley closed 4 years ago

HolyWalley commented 5 years ago

Hello.

import { IntlProvider } from 'preact-i18n';
import definition from './locales/en.js';

render(<IntlProvider definition={definition}><CreateStoreForm /></IntlProvider>, createStoreForm);

locales.en.js

const definition = {
  store: {
    form: {
      access_token: 'Access token',
      base_api_url: 'Base api url'
    }
  }
};

export default definition;

this code renders nothing with preact version 10.0.0-beta.2, but works ok with 8.4.2.

I was using 10.0.0-beta.2 for <Fragment>, it's not necessary for me, I can just use div instead, so I downgraded my version of Preact.

I don't have enough time to dig into the problem, but I think it's ok to mention it here.

pl12133 commented 5 years ago

@HolyWalley Thanks for the report, we have started to support Preact X and you can now test the Preact X version by installing the preactx tag:

npm i preact-i18n@preactx

While Preact X is in beta these changes may not be stable, so if you find any remaining issues feel free to add them here.

noahm commented 4 years ago

Gentle bump on this. Preact X has been out for a bit now and your existing preactx tag is working well with the final release for my app. 😄

billneff79 commented 4 years ago

Going to close this issue for now since this one in particular was fixed. @noahm there is another bug #39 that would need to be fixed before we make the preactX branch into master and mark this the official latest tag