From 9b70cd2001650681305b9eb78deca797f4dd08cc Mon Sep 17 00:00:00 2001 From: "Kent C. Dodds" Date: Wed, 13 Mar 2024 11:15:55 -0600 Subject: [PATCH] update instructions --- exercises/02.side-effects/01.problem.effects/README.mdx | 2 +- exercises/02.side-effects/README.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/02.side-effects/01.problem.effects/README.mdx b/exercises/02.side-effects/01.problem.effects/README.mdx index 801620f5b..3fdb6b3a8 100644 --- a/exercises/02.side-effects/01.problem.effects/README.mdx +++ b/exercises/02.side-effects/01.problem.effects/README.mdx @@ -21,7 +21,7 @@ The only way to be notified of a back/forward event is to listen for the `popstate` event. You can do this by adding an event listener to the `window` object. -```javascript +```tsx window.addEventListener('popstate', () => { // update the input value }) diff --git a/exercises/02.side-effects/README.mdx b/exercises/02.side-effects/README.mdx index a13e8b984..e61cca7e3 100644 --- a/exercises/02.side-effects/README.mdx +++ b/exercises/02.side-effects/README.mdx @@ -4,7 +4,7 @@ after React renders (and re-renders) your component to the DOM. It accepts a callback function which React will call after the DOM has been updated: -```javascript +```tsx useEffect(() => { // your side-effect code here. // this is where you can interact with browser APIs for example