You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use react-streams with upcoming hooks from react. And I am seeing some issues.
Here is what I am trying to do...
importReact,{useContext}from'react'import{streamProps}from'react-streams'import{Ctx}from'./Ctx'constComponent2=streamProps((props$)=>{constctx=useContext(Ctx)//want to use the ctx along to help transform some stream values of props$returnprops$})exportdefaultComponent2
When the useContext hook is invoked, I get TypeError: dispatcher.useContext is not a function.
Please advice on what alternatives I have?
Thanks,
Muthu
The text was updated successfully, but these errors were encountered:
My bad. Had some issues with package.json. I can interoperate with useContext.
But, I do have a question. Do I have any hooks to perform cleanup like operation when the above Component2 goes thru an unmount process?
Also, I tried to use stream(source$, pipeOperation) inside an streamProps and attempted to combine streams (above stream and props$) did run into an error.
From https://youtu.be/voVU3G7Y39A?t=1030, it seems like the functions have changed.
Hello there,
I am trying to use
react-streams
with upcominghooks
from react. And I am seeing some issues.Here is what I am trying to do...
When the
useContext
hook is invoked, I getTypeError: dispatcher.useContext is not a function
.Please advice on what alternatives I have?
Thanks,
Muthu
The text was updated successfully, but these errors were encountered: