TypeError: nextDeps.join is not a function

See original GitHub issue

I am getting this error while using hooks. image

This is related code.

const market = useContext(MarketContext); useEffect(() => {

  nav.items[1] = {
                 name: 'Market',
                url: '/market',
                icon: 'icon-speedometer',
                badge: {
                       variant: market == "Live" ? "primary" : "secondary",
                text: market,
           }
  };    

}, market)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

234reactions
gaearoncommented, Mar 5, 2019

You probably meant to pass [market] rather than market as useEffect argument.

7reactions
gaearoncommented, Mar 5, 2019

I’ll close but I’m sending https://github.com/facebook/react/pull/15018 to add a warning for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError : mainArr.join is not a function - Stack Overflow
So the error is that you are assigning back to mainArr after the result of push which is wrong here mainArr = mainArr.push(mainArr[0]);...
Read more >
[React] TypeError: prevDeps.join is not a function - 만족
[React] TypeError: prevDeps.join is not a function · hook을 사용하다가 발생하는 에러다. · 즉 useEffect의 마지막 인자(deps)부분이 array가 아니라서 ...
Read more >
TypeError: keywords.join is not a function
I get an error (TypeError: keywords.join is not a function) on below code of Gatsbyjs project, inside seo.js file .concat( keywords.length > ...
Read more >
ezplatform: react-dom-server.browser.development.js - Fossies
// Assumes there is no parent namespace. function getIntrinsicNamespace(type) {, function getIntrinsicNamespace(type) {. switch (type) {, switch (type) ...
Read more >
How To Fix React Context'S Object Is Not A Function - Typeerror
I am currently trying to use Context to get a date string from an event on a Line Graph. is not a function,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found