react2angular icon indicating copy to clipboard operation
react2angular copied to clipboard

React hooks

Open brianHolonis opened this issue 6 years ago • 5 comments

If I use React hooks with a React.useState is this package expected to work with that?

Thank you.

brianHolonis avatar Oct 01 '19 17:10 brianHolonis

It works with hooks.

captrespect avatar Feb 17 '20 19:02 captrespect

@bcherny is this answer correct? I'm getting the mismatched component error even though my functional component with hooks is not a child of any class components:

Invariant Violation: Invalid hook call. Hooks can only be called inside of the body of a function component

celtic7716 avatar Nov 13 '20 20:11 celtic7716

I am also receiving the error above when trying to use hooks.

I am using them within a functional component in the same way that I use them in a none react2angular React component, and that is working fine.

nickvallee avatar Dec 11 '20 15:12 nickvallee

I am also receiving the error above when trying to use hooks.

gmoura avatar Mar 15 '22 02:03 gmoura

We are using react inside angularjs for now without a problem. Including functional components. Not sure what we did back then when we received the error but it works now.

function TopLevelReact

elpddev avatar Mar 15 '22 07:03 elpddev