New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@liveblocks/react

Package Overview
Dependencies
Maintainers
2
Versions
461
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@liveblocks/react - npm Package Compare versions

Comparing version 0.10.0 to 0.11.0

8

lib/index.d.ts

@@ -131,12 +131,12 @@ import { Client, RecordData, Others, Presence, Record, InitialStorageFactory, Room, User } from "@liveblocks/client";

/**
* useCurrentUser is a react hook that lets you react to get the current user once it is connected to the room.
* Gets the current user once it is connected to the room.
*
* ### Example
* ``` typescript
* import { useCurrentUser } from "@liveblocks/react";
* import { useSelf } from "@liveblocks/react";
*
* const user = useCurrentUser();
* const user = useSelf();
* ```
*/
export declare function useCurrentUser<TPresence extends Presence = Presence>(): User<TPresence> | null;
export declare function useSelf<TPresence extends Presence = Presence>(): User<TPresence> | null;
declare type StorageActions = {

@@ -143,0 +143,0 @@ createRecord: Room["createRecord"];

@@ -281,12 +281,12 @@ Object.defineProperty(exports, '__esModule', { value: true });

/**
* useCurrentUser is a react hook that lets you react to get the current user once it is connected to the room.
* Gets the current user once it is connected to the room.
*
* ### Example
* ``` typescript
* import { useCurrentUser } from "@liveblocks/react";
* import { useSelf } from "@liveblocks/react";
*
* const user = useCurrentUser();
* const user = useSelf();
* ```
*/
function useCurrentUser() {
function useSelf() {
var room = useRoom();

@@ -305,3 +305,3 @@ var _a = React.useState(0), update = _a[1];

}, [room]);
return room.getCurrentUser();
return room.getSelf();
}

@@ -367,3 +367,2 @@ function useStorage(initialStorage) {

exports.useBroadcastEvent = useBroadcastEvent;
exports.useCurrentUser = useCurrentUser;
exports.useErrorListener = useErrorListener;

@@ -373,2 +372,3 @@ exports.useEventListener = useEventListener;

exports.useOthers = useOthers;
exports.useSelf = useSelf;
exports.useStorage = useStorage;

@@ -375,0 +375,0 @@ exports.useStorageActions = useStorageActions;

{
"name": "@liveblocks/react",
"version": "0.10.0",
"version": "0.11.0",
"description": "",

@@ -26,3 +26,3 @@ "main": "./lib/index.js",

"peerDependencies": {
"@liveblocks/client": "0.10.0",
"@liveblocks/client": "0.11.0",
"react": "^16.14.0 || ^17"

@@ -29,0 +29,0 @@ },

Sorry, the diff of this file is not supported yet

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