I try to use useEffect but it gets error looks like in below,
React Hook useEffect has a missing dependency: 'data'. Either include it or remove the dependency array
Here is my component,
let id = props.location.pathname.split("--")[1];
let str = props.location.pathname.split("--")[0].substr(1);
const data = {id: id, link: str}
const [title, setTitle] = useState("")
useEffect(() => {
    setTitle("...") // Yükleniyor.
    async function getTitle() {             
        axios.post('/api/data/entry/get', data)
        .then(res => {
        setTitle(res.data.title)
        // TODO: Catch ekle.
        })
    }
    getTitle()
}, [props])
 
     
    