Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jsiebern/bs-react-sticky

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsiebern/bs-react-sticky

Reason bindings for the react-sticky package

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Reason bindings for react-sticky

This library provides Reason bindings for react-sticky.

These bindings should be complete and working, I use them in production without problems. If, however, you encounter any problems, feel free to open an issue.

Installation (for your Reason project)

Run:

yarn add react-sticky @jsiebern/bs-react-sticky

to add the library to your project dependencies. And add @jsiebern/bs-react-sticky to the bs-dependencies node of your bsconfig.json.

Example

See this link for the full example.

let component = ReasonReact.statelessComponent("App");

let make = _children => {
  ...component,
  render: _self =>
    <ReactSticky.StickyContainer>
      <ReactSticky.Sticky>
        ...(
             stickyProps =>
               ReactSticky.Sticky.RenderProps.(
                 <div style=(stickyProps |. style)>
                   ((stickyProps |. isSticky ? "Moving" : "Not Moving") |. ReasonReact.string)
                 </div>
               )
           )
      </ReactSticky.Sticky>
    </ReactSticky.StickyContainer>,
};

Important: The bindings use an abstract object type, so the easiest thing to access the stickyProps is to open ReactSticky.Sticky.RenderProps and then access the render functions props by the chain operator (e.g. stickyProps |. isSticky).

Keywords

FAQs

Package last updated on 07 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc