From 7138aa016fd34567317044de444c836962abbdb4 Mon Sep 17 00:00:00 2001 From: Sandro Miguel Marques Date: Wed, 23 Sep 2020 10:45:00 +0100 Subject: [PATCH] Rename state setter from useText to setText (#3281) --- content/blog/2020-09-22-introducing-the-new-jsx-transform.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/blog/2020-09-22-introducing-the-new-jsx-transform.md b/content/blog/2020-09-22-introducing-the-new-jsx-transform.md index 310e64ae..cb12f12c 100644 --- a/content/blog/2020-09-22-introducing-the-new-jsx-transform.md +++ b/content/blog/2020-09-22-introducing-the-new-jsx-transform.md @@ -241,7 +241,7 @@ For example, import React from 'react'; function App() { - const [text, useText] = React.useState('Hello World'); + const [text, setText] = React.useState('Hello World'); return

{text}

; } ``` @@ -252,7 +252,7 @@ will be replaced with import { useState } from 'react'; function App() { - const [text, useText] = useState('Hello World'); + const [text, setText] = useState('Hello World'); return

{text}

; } ```