0.1.17 β€’ Published 3 years ago

sentineler v0.1.17

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

LinkedIn site-status

πŸ“– About the project

The package is a "sentinel" that trigger a function when is visible.

πŸ”‹ Built with:

:scroll: Getting Started

To run the project it is just:

:warning: Requirements

  • npm
    npm install npm@latest -g

:gear: Installation

  1. Install the package
    npm install sentineler
    ou
    yarn add sentineler
  2. Import the package
    import Sentineler from "sentineler";
  3. Call the compoenent and give the callback

    <Sentinel
      callback={() => {
        console.log("test");
      }}
    />

    Example:

    import Sentineler from "sentineler";
    
    const App = () => {
      return (
        <Sentinel
          callback={() => {
            console.log("test");
          }}
        />
      );
    };
    
    export default App;

:bone: Props

PropTypeDefaultDescription
callback (required)Function–Callback function to run when the Sentineler is visible

πŸ–₯️ Site Preview

site-status

I made this infinite scroll using this component.

See the Site Preview: https://taq-challenge.vercel.app

:dart: Test

To contribute to the project you just need:

  1. Clone the repository
    git clone https://github.com/OuthBack/sentineler
  2. Install the packages
    npm install
    ou
    yarn
  3. For now you can create a link, but soon I will create a react application
    yarn link
  4. In another project that you are using react
    yarn link "sentineler"
  5. Now it is just follow the example

:pencil: Licence

Distributed under the MIT License. See LICENSE for more information.

:telephone_receiver: Contact

Henrique Figueiredo - riquessan@gmail.com

Project Link: https://github.com/OuthBack/sentineler