How to use the react-stay-scrolled.scrolled function in react-stay-scrolled

To help you get started, we’ve selected a few react-stay-scrolled examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github perrin4869 / react-stay-scrolled / examples / src / message.jsx View on Github external
stayScrolled: PropTypes.func.isRequired,
  }

  componentDidMount() {
    const { stayScrolled } = this.props;
    stayScrolled();
  }

  render() {
    const { text } = this.props;

    return <div>{text}</div>;
  }
}

export default scrolled(Message);
github AJInteractive / InterviewJS / packages / composer / src / partials / misc / Storyline.js View on Github external
))}
      
    );
  }
}

Storyline.propTypes = {
  storyline: arrayOf(object)
};

Storyline.defaultProps = {
  storyline: []
};

export default scrolled(Storyline);
github generative-music / generative.fm / src / components / player / log.jsx View on Github external
import React, { Component } from 'react';
import { scrolled } from 'react-stay-scrolled';
import PropTypes from 'prop-types';

class Log extends Component {
  render() {
    return <div>{this.props.message.toLowerCase()}</div>;
  }
}

Log.propTypes = {
  scrollBottom: PropTypes.func,
  message: PropTypes.string,
};

export default scrolled(Log);
github singer-io / knots / app / components / Log / index.js View on Github external
};

class Log extends Component {
  componentDidMount() {
    const { stayScrolled } = this.props;
    stayScrolled();
  }

  render() {
    const { log } = this.props;

    return <pre>{log}</pre>;
  }
}

export default scrolled(Log);

react-stay-scrolled

React component to keep content always scrolled down

MIT
Latest version published 8 months ago

Package Health Score

72 / 100
Full package analysis

Popular react-stay-scrolled functions