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

react-json-view-lite

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-json-view-lite - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 1.2.1
### Bug Fixes
- [Fixed](https://github.com/AnyRoad/react-json-view-lite/issues/20) component didn't work with React 16 and React 17
## 1.2.0

@@ -2,0 +8,0 @@

1

dist/hooks.d.ts
export declare function useBool(initialValueCreator: () => boolean): [boolean, () => void, (value: boolean) => void];
export declare function useComponentId(): string;

@@ -30,2 +30,11 @@ var React = require('react');

}
let componentId = 1;
const generateNextId = () => componentId++;
function useComponentId() {
const componentId = React.useRef();
if (componentId.current === undefined) {
componentId.current = `:jsnvw:${generateNextId()}:`;
}
return componentId.current;
}

@@ -55,3 +64,3 @@ function ExpandableObject(_ref) {

const ariaLabel = expanded ? 'collapse JSON' : 'expand JSON';
const contentsId = React.useId();
const contentsId = useComponentId();
const childLevel = level + 1;

@@ -58,0 +67,0 @@ const lastIndex = data.length - 1;

@@ -1,2 +0,2 @@

import { useState, createElement, useRef, useEffect, useId } from 'react';
import { useState, useRef, createElement, useEffect } from 'react';

@@ -30,2 +30,11 @@ const isBoolean = data => {

}
let componentId = 1;
const generateNextId = () => componentId++;
function useComponentId() {
const componentId = useRef();
if (componentId.current === undefined) {
componentId.current = `:jsnvw:${generateNextId()}:`;
}
return componentId.current;
}

@@ -55,3 +64,3 @@ function ExpandableObject(_ref) {

const ariaLabel = expanded ? 'collapse JSON' : 'expand JSON';
const contentsId = useId();
const contentsId = useComponentId();
const childLevel = level + 1;

@@ -58,0 +67,0 @@ const lastIndex = data.length - 1;

2

package.json
{
"name": "react-json-view-lite",
"version": "1.2.0",
"version": "1.2.1",
"description": "JSON viewer component for React focused on performance for large volume input while still providing few customiziation features",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/AnyRoad/react-json-view-lite",

Sorry, the diff of this file is not supported yet

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