adam-cowley / use-neo4j

React Hooks for Neo4j
MIT License
73 stars 21 forks source link

Re-running a Query missing dependency #9

Open AndrejGajdos opened 3 years ago

AndrejGajdos commented 3 years ago

Hi there,

I think there is missing dependency in a hook in Readme:

// Listen for changes to `query` and re-run cypher if anything changes
useEffect(() => {
    run({ query })
}, [ query ])

Should be

// Listen for changes to `query` and re-run cypher if anything changes
useEffect(() => {
    run({ query })
}, [ run, query ])