diff --git a/v8.18.3/guides/amp.md b/v8.18.3/guides/amp.md index 19c8475..04672a2 100644 --- a/v8.18.3/guides/amp.md +++ b/v8.18.3/guides/amp.md @@ -59,7 +59,7 @@ ctx.renderPage = async () => { ## Two-way data binding -AMP and React have fundamentally different patterns for managing state. React allows you to respond to events with javascript and update state using the update function returned by the `useState` hook. AMP uses a more declarative approach with [amp-bind](https://amp.dev/documentation/components/amp-bind/) that resembles to-way data-binding. In order to create a common approach to state management that works in both react and amp, `react-storefront-amp` provides two-way databinding via a `DataBindingProvider` component and the `bind` prop. +AMP and React have fundamentally different patterns for managing state. React allows you to respond to events with javascript and update state using the update function returned by the `useState` hook. AMP uses a more declarative approach with [amp-bind](https://amp.dev/documentation/components/amp-bind/) that resembles two-way data-binding. In order to create a common approach to state management that works in both react and amp, `react-storefront-amp` provides two-way databinding via a `DataBindingProvider` component and the `bind` prop. Here's a simple example from `pages/p/[productId].js` that shows how the quantity selector updates the page state in both AMP and React using the same code: diff --git a/v8.18.3/guides/performance.md b/v8.18.3/guides/performance.md index 21a9ec1..ca2f2e9 100644 --- a/v8.18.3/guides/performance.md +++ b/v8.18.3/guides/performance.md @@ -37,5 +37,5 @@ mainProductImage.src = await getBase64ForImage(mainProductImage.src) ### defer vs async -Oue tests show that using `defer` instead of `async` when importing client-side JavaScript generally improves Lighthouse performance scores by a few points. It usually improves FCP and LCP, but makes TTI and TBT a bit worse. Normally this trade-off nets a higher Lighthouse score. This may or may not be the case for your app. You can experiment by changing the `mode` prop from `defer` to `async` in `NextScript` in `pages/_document_.js` +Our tests show that using `defer` instead of `async` when importing client-side JavaScript generally improves Lighthouse performance scores by a few points. It usually improves FCP and LCP, but makes TTI and TBT a bit worse. Normally this trade-off nets a higher Lighthouse score. This may or may not be the case for your app. You can experiment by changing the `mode` prop from `defer` to `async` in `NextScript` in `pages/_document_.js`