Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
docs: Fix the indentation of example code on the home page
Browse files Browse the repository at this point in the history
  • Loading branch information
mohebifar committed Mar 2, 2024
1 parent ddd1b29 commit 49b41be
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions apps/docs/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,24 @@ React Unforget is a project inspired by the principles of React Forget, designed
export default function CounterWithMutationTracking() {
const [state, setState] = useState(0);
let text = "The number is: ";
if (state % 2 === 0) {
text += "even";
} else {
text += "odd";
let text = "The number is: ";
if (state % 2 === 0) {
text += "even";
} else {
text += "odd";
}
return (
<div>
<button onClick={() => setState(state + 1)}>Increment</button>
<div>
<span>Count: {state}</span> {text}
</div>
</div>
);
}
return (
<div>
<button onClick={() => setState(state + 1)}>Increment</button>
<div>
<span>Count: {state}</span> {text}
</div>
</div>
); } `}
`}

</DynamicLiveCodeSandpack>

Expand Down

0 comments on commit 49b41be

Please sign in to comment.