// @flow import * as React from 'react'; import { ContentState } from 'draft-js'; type Props = { children: React.Node, // React.ChildrenArray> unsupported by babel-plugin-flow-react-proptypes contentState: ContentState, decoratedText: string, entityKey?: string, }; const DraftMentionItem = ({ contentState, entityKey, children }: Props) => { let id = ''; if (entityKey) { id = contentState.getEntity(entityKey).getData().id; } return {children}; }; export default DraftMentionItem;