Skip to content

Commit

Permalink
testing useEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
milkon19960801 committed May 7, 2021
1 parent 9745c06 commit b6696fc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/Search.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import React, { useState } from 'react';
import React, { useState, useEffect } from 'react';

const Search = () => {
const [term, setTerm] = useState('');

useEffect(() => {
console.log('I RUN IF DATA CHANGES');
}, [term]);

return (
<div>
<div className="ui form">
Expand Down

0 comments on commit b6696fc

Please sign in to comment.