Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Hooks can only be called inside of the body of a function component.

Petr Stukalov free asked 3 years ago


return (
    <MDBContainer>
        <MDBRow className="pb-3">
            <MDBCol className="px-0">
                <MDBBtnGroup aria-label='Basic example'>
                    <MDBBtn>Left</MDBBtn>
                    <MDBBtn>Middle</MDBBtn>
                    <MDBBtn>Right</MDBBtn>
                </MDBBtnGroup>
            </MDBCol>
        </MDBRow>
    </MDBContainer>
);

Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: 1. You might have mismatching versions of React and the renderer (such as React DOM) 2. You might be breaking the Rules of Hooks 3. You might have more than one copy of React in the same app See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.

What am I doing wrong?


Wojciech Staniszewski staff commented 3 years ago

If You still are interested in using MDB React and this topic, please paste the code of the whole component.


Petr Stukalov free answered 3 years ago


Refund money please.


Adam Jakubowski staff commented 3 years ago

Hello @Petr Stukalov,

The support forum is dedicated to technical questions.

All questions regarding MDB licensing, products, partnerships and other non-technical queries - it should be asked directly to contact@mdbootstrap.com

I've reached out to you via email address assigned to your mdbootstrap account.

Keep coding,

Adam From MDB



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: MDB4 5.0.1
  • Device: node v16.0.0
  • Browser: Google Chrome 90.0.4430.85
  • OS: Mint
  • Provided sample code: No
  • Provided link: Yes
Tags