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

react-cosmos-renderer

Package Overview
Dependencies
Maintainers
1
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-cosmos-renderer - npm Package Compare versions

Comparing version 6.0.3-canary.ba5bf84.0 to 6.0.3

16

dist/fixture/FixtureCapture/props/index.js

@@ -9,3 +9,3 @@ import { useEffect, useRef } from 'react';

const [propsFs, setPropsFs] = useFixtureState('props');
const prevFixtureRef = useRef(fixture);
const prevFixtureRef = useRef(null);
const elPaths = findRelevantElementPaths(fixture);

@@ -44,2 +44,16 @@ useEffect(() => {

else {
// This code path is problematic because we can't tell whether:
// a) This is the first time the fixture renders
// b) A (suboptimal) HMR update blew up the FixtureCapture instance
// For this reason we have a tradeoff:
// - Override new fixture element props with fixture state props values
// - Override fixture state props with new fixture element props values
// We chose the latter because it makes HMR more reliable by allowing
// users to update props in Node fixtures via source code (when HMR
// isn't working optimally, which might be common.)
// The downside with this approach is that a renderer that loads a
// fixture with fixture state will ignore props from the fixture state
// initially. This is more of an edge case that probably few people will
// run into. For more context, see:
// https://github.com/react-cosmos/react-cosmos/pull/1614
const prevChildEl = getElementAtPath(prevFixtureRef.current, elPath);

@@ -46,0 +60,0 @@ if (!areNodesEqual(prevChildEl, childEl, false)) {

6

package.json
{
"name": "react-cosmos-renderer",
"version": "6.0.3-canary.ba5bf84.0+ba5bf84",
"version": "6.0.3",
"description": "React Cosmos Renderer",

@@ -15,6 +15,6 @@ "repository": "https://github.com/react-cosmos/react-cosmos/tree/main/packages/react-cosmos-renderer",

"lodash-es": "4.17.21",
"react-cosmos-core": "6.0.3-canary.ba5bf84.0+ba5bf84",
"react-cosmos-core": "^6.0.1",
"react-is": "18.2.0"
},
"gitHead": "ba5bf840dfe5e39566ccf6f262c36017bf5552d1"
"gitHead": "a046d36222582e9750fc23fee9eaeed146f44633"
}
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