Shopify / shopify-cli-extensions

MIT License
24 stars 9 forks source link

use the useTranslate hook in the react scaffold #363

Closed balaclark closed 2 years ago

balaclark commented 2 years ago

Updates the React extension scaffold to use the useTranslate hook for translations.

Closes: https://github.com/Shopify/shopify-cli-extensions/issues/362

balaclark commented 2 years ago

Looks great, thanks.

How did you tophat it? Is there anything you can add to the readme that would help in tophatting?

I copy/pasted the code into a fresh extension. The issue I had was that my installed version of checkout-ui-extensions-react was 0.12.0 and didn't contain useTranslate. From what I can tell from the CLI package.json this shouldn't be an issue though as it always installs the latest version.

I don't think there is anything new needed for the readme tbh, but looking at the dev docs those could be updated with the hook used instead of i18n.translate

kumar303 commented 2 years ago

looking at the dev docs those could be updated with the hook used instead of i18n.translate

Can you file a separate issue for fixing those docs?