Skip to content

Commit 02c5b15

Browse files
authored
Update README.md
1 parent 9c86949 commit 02c5b15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ function App() {
253253
}
254254

255255
function A() {
256-
const context = useContext(Context, ctx => ctx.count1)
256+
const context = useContext(Context, ctx => ctx.count1) // with selector, only execute when count1 changed
257257
console.log('A')
258258
return <div>{context}</div>
259259
}

0 commit comments

Comments
 (0)