New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

use-rem-value

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-rem-value

A simple React Hook that provide a current font size of the html node.

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

use-rem-value

This hook can help you to solve problems, when you have to use values in pixel (e.g. if you use react-virtualized), but all your sizes is based on rem. You can check an example here.

Installation

npm install use-rem-value

How to use

const MyComponent = (props) => {
    const remValue = useRemValue();

    return (
        <div>Current rem value is {remValue}.</div>
    );
}

Keywords

react

FAQs

Package last updated on 05 Apr 2022

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