Skip to content

Commit

Permalink
fix: create a const for the counter object (#693)
Browse files Browse the repository at this point in the history
  • Loading branch information
ubmit authored Apr 26, 2024
1 parent f82a195 commit b5cf127
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/concepts/context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ import { createSignal, createContext, useContext } from "solid-js";
const CounterContext = createContext(); // create context

export function CounterProvider(props) {
const [count, setCount] = createSignal(props.count || 0),
counter = [
const [count, setCount] = createSignal(props.count || 0);
const counter = [
count,
{
increment() {
Expand Down

0 comments on commit b5cf127

Please sign in to comment.