React ref returns a 'Connect' object instead of DOM
问题 I'm trying to create dynamics refs for custom components created through the map function. class PostsList extends Component { constructor(props) { super(props); } componentDidUpdate = () => { console.log(this.refs); } render() { let posts = this.props.posts || []; return ( <div ref="test"> {posts.map((post) => { return <Post post={post} key={post.id} ref={post.id}></Post> })} </div> ); } } export default PostsList the console.log returns the correct DOM node for refs.test but for the ones in