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

@murden.dev/lifecycle-hooks

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@murden.dev/lifecycle-hooks

React Class Components lifecycle methods written as React Hooks for those that are transitioning from React Class Components or maybe just want a little more legibility in their code.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

@murden.dev/lifecycle-hooks

React Class Components lifecycle methods written as React Hooks

For those that are transitioning from React Class Components or maybe just want a little more legibility in their code.

1. Install package

npm install @murden.dev/lifecycle-hooks

2. Import package and enjoy lifecycle-hooks :)

import { useOnMount, useOnUnmount, useOnUpdate } from '@murden.dev/lifecycle-hooks'

const Component = () => {

    useOnMount(() => {
        // Function that runs only once, when Component is mounted
    })

    useOnUnmount(() => {
        // Function that runs only once, when Component is about to be unmounted
    })

    useOnUpdate(() => {
        // Function that runs on every Component re-render
    })

    // (...)
}

Keywords

lifecycle

FAQs

Package last updated on 12 Dec 2025

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