What is the difference between the following? Particularly in terms of functionality?
<div ref={this.myRef}/>
<div ref={(elem) => {this.myRef = elem;}}/>
When I do the second of the above and call this.myRef.scrollIntoView({behavior: 'smooth'}), the scrolling behavior works. However, after changing it to the first, it doesn't work.
createRefin the first case?createRefin both cases.