问题 I've created a React component for a fixed nav that I would like to remain hidden, until I scroll past a certain point on the page, then slides into view. Medium has a header similar to what I'm describing. This is a relatively trivial task in jQuery, with scrollmagic or waypoints but is there an idiomatic way of accomplishing this with React and vanilla JS? 回答1: React Way with vanilla JS jsfiddle; don't forget to remove EventListener. In this example component will render if only it is