Announced details:
type IProps = {
user: ?Map<string, any> & Record<IUser>,
};
Assigning variables from props using destructuring:
const { user } = this.props;
const { name, surname } = user.toJS();
uservariable is typeof Map (immutable.js map). Must be used .toJS()to change it to an object. But then a stream error / warning message appears:
Flow: Call of method .toJS().
Method cannot be called on any member of intersection type intersection.
I tried to cope with it myself, failed.
Any help is much appreciated!
source
share