Socket
Socket
Sign inDemoInstall

@mui/utils

Package Overview
Dependencies
10
Maintainers
10
Versions
78
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @mui/utils

Utility functions for React components.


Version published
Weekly downloads
4.2M
decreased by-2.92%
Maintainers
10
Install size
1.42 MB
Created
Weekly downloads
 

Package description

What is @mui/utils?

The @mui/utils package provides a collection of utility functions designed to aid in the development of UI components and applications. These utilities cover a range of functionalities such as deep object manipulation, event handling, and system property helpers, making it easier to implement common tasks in a more efficient and standardized way.

What are @mui/utils's main functionalities?

Deep object manipulation

Allows for the deep merging of two objects, useful for combining default and user-provided configurations.

import { deepmerge } from '@mui/utils';
const obj1 = { a: 1, b: 2 };
const obj2 = { b: 3, c: 4 };
const merged = deepmerge(obj1, obj2);
// Result: { a: 1, b: 3, c: 4 }

Event handling

Facilitates getting the owner document of a node, which is helpful for correctly attaching event listeners in a document-agnostic way.

import { ownerDocument } from '@mui/utils';
const doc = ownerDocument(node);
// Use doc to add or remove event listeners

System property helpers

Provides an enhanced effect hook that uses `useLayoutEffect` on the server to avoid warnings and `useEffect` on the client.

import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';
useEnhancedEffect(() => {
  // Effect logic here
}, [deps]);

Other packages similar to @mui/utils

Changelog

Source

v5.15.14

<!-- generated comparing v5.15.13..master -->

Mar 18, 2024

A big thanks to the 15 contributors who made this release possible. This release was mostly about 🐛 bug fixes and 📚 documentation improvements.

Readme

Source

@mui/utils

Shared utilities used by MUI packages.

Keywords

FAQs

Last updated on 19 Mar 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc