Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cndocs/the-new-architecture/custom-cxx-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<SafeAreaView style={styles.container}>
<View>
Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion cndocs/the-new-architecture/layout-measurements.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down