close

[Solved] TypeError: Object(…) is not a function reactjs

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error TypeError: Object(…) is not a function reactjs. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How To Solve TypeError: Object(…) is not a function reactjs Error ?

  1. How To Solve TypeError: Object(…) is not a function reactjs Error?

    To Solve TypeError: Object(…) is not a function reactjs Error you just have to export your function that's it. For example. Just use export let fillCalendar = (month, year) => {}

  2. TypeError: Object(…) is not a function reactjs

    To Solve TypeError: Object(…) is not a function reactjs Error you just have to export your function that's it. For example. Just use export let fillCalendar = (month, year) => {}

Solution 1

Here looks fine, you just have to export your function that’s it. For example. Just use

export let fillCalendar = (month, year) => {

instead of

let fillCalendar = (month, year) => {

Solution 2

Example for Higher-Order Component. Export function directly from after the declaration

export default function Authorized(WrappedComponent) {

}

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read

Leave a Comment