Hello there,
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...
import React, {useContext} from 'react'
import {streamProps} from 'react-streams'
import {Ctx} from './Ctx'
const Component2 = streamProps( (props$) => {
const ctx = useContext(Ctx)
//want to use the ctx along to help transform some stream values of props$
return props$
})
export default Component2
When the useContext hook is invoked, I get TypeError: dispatcher.useContext is not a function.
Please advice on what alternatives I have?
Thanks,
Muthu
Hello there,
I am trying to use
react-streamswith upcominghooksfrom react. And I am seeing some issues.Here is what I am trying to do...
When the
useContexthook is invoked, I getTypeError: dispatcher.useContext is not a function.Please advice on what alternatives I have?
Thanks,
Muthu