Closed saiemsaeed closed 5 years ago
Hey @saiemsaeed can you try like this: export default withRouter(withAlert()(Login))
?
See the extra ()
between withAlert
and (Login)
.
Ah Suck, not putting () wasted my couple of hours. Thanks @schiehll for the help. You should update documentation.
The example in the docs have the extra ()
, I just double checked. I'm glad it solved!
@schiehll i was following docs on npm package page. Please check, its wrong there!
Oh yeah, didn't noticed, thank you for pointing it out! I will update it.
I installed lastest version 5.0.0 and implemented same as instructed in documentation, but when i attach withRouter HOC in my app. It gives me error in console that Functions are not valid as a React child.