diff --git a/cndocs/the-new-architecture/custom-cxx-types.md b/cndocs/the-new-architecture/custom-cxx-types.md index 94db3e21b3f..edc490b8070 100644 --- a/cndocs/the-new-architecture/custom-cxx-types.md +++ b/cndocs/the-new-architecture/custom-cxx-types.md @@ -173,8 +173,8 @@ First, we need to update the `App.tsx` file to use the new method from the Turbo ```diff title="App.tsx" // ... -+ const [cubicSource, setCubicSource] = React.useState('') -+ const [cubicRoot, setCubicRoot] = React.useState(0) ++ const [cubicSource, setCubicSource] = useState('') ++ const [cubicRoot, setCubicRoot] = useState(0) return ( @@ -366,9 +366,9 @@ To test the code in the app, we have to modify the `App.tsx` file. 2. Replace the body of the `App()` function with the following code: ```tsx title="App.tsx (App function body replacement)" -const [street, setStreet] = React.useState(''); -const [num, setNum] = React.useState(''); -const [isValidAddress, setIsValidAddress] = React.useState< +const [street, setStreet] = useState(''); +const [num, setNum] = useState(''); +const [isValidAddress, setIsValidAddress] = useState< boolean | null >(null); diff --git a/cndocs/the-new-architecture/layout-measurements.md b/cndocs/the-new-architecture/layout-measurements.md index cc693a99b0c..715cd42aee7 100644 --- a/cndocs/the-new-architecture/layout-measurements.md +++ b/cndocs/the-new-architecture/layout-measurements.md @@ -10,7 +10,7 @@ Typical code will look like this: ```tsx function AComponent(children) { - const targetRef = React.useRef(null) + const targetRef = useRef(null) useLayoutEffect(() => { targetRef.current?.measure((x, y, width, height, pageX, pageY) => {