node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »


Planett Go Back To Top Simple

This is a react class bind a go back to top function. You can give a component to it and a data for the props of this component.


  npm install planett-go-back-to-top-simple


  import React from 'react';
  import ReactDOM from 'react-dom';
  import GoBack from 'planett-go-back-to-top-simple';
  import Component from 'your/path/to/component';
  let data = {
    'contolDom': 'main',
    'component': Component,
    'data': {}
  React.Render(<GoBack data={ data } />, documnet.getElementById('root'));
  • contolDom: this is whose scroll bar you need to control.