Skip to content

Commit

Permalink
study: useEffect
Browse files Browse the repository at this point in the history
쏘랑 유즈이펙트 공부했음
#6
  • Loading branch information
derrick0526 committed Aug 15, 2022
1 parent c009b75 commit 0a91435
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions pages/test/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from 'react'
import { useEffect, useState } from 'react'

const Test = () => {
const [sso, setSso] = useState('sssssssssssssssssssssso')
const [sso, setSso] = useState('')
const [visible, setVisible] = useState(false)

const handleSsoNameChange = (text) => {
Expand All @@ -17,6 +17,26 @@ const Test = () => {
})
}

// useEffect(() => {
// console.log(
// 'ssssssssssssssssssssssssssssssssssoooooooooooooooooooooooooooo',
// )
// }, [])

// useEffect(() => {
// console.log(
// 'ssssssssssssssssssssssssssssssssssoooooooooooooooooooooooooooo',
// )
// }, [sso])

useEffect(() => {
handleVisible()
}, [sso])

useEffect(() => {
handleVisible()
}, [])

return (
<>
{sso}
Expand Down

0 comments on commit 0a91435

Please sign in to comment.