react-cosmos-renderer
Advanced tools
Comparing version 6.0.0-canary.1507195.0 to 6.0.0-canary.046251b.0
@@ -31,3 +31,4 @@ import React, { useEffect } from 'react'; | ||
}); | ||
}, [args.options, defaultValue, selectName, setFixtureState]); | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, [String(args.options), defaultValue, selectName, setFixtureState]); | ||
} |
import React from 'react'; | ||
import { getFixtureListFromWrappers, isInsideWindowIframe, } from 'react-cosmos-core'; | ||
import { DelayRender, getFixtureListFromWrappers, } from 'react-cosmos-core'; | ||
import { RendererSync } from './RendererSync.js'; | ||
@@ -8,5 +8,3 @@ export function FixtureLoaderConnect({ moduleWrappers, fixtureSelection, renderMessage, renderFixture, }) { | ||
if (!fixtureSelection) { | ||
return isInsideWindowIframe() | ||
? null | ||
: renderMessage('No fixture selected.'); | ||
return (React.createElement(DelayRender, { delay: 500 }, renderMessage('No fixture selected.'))); | ||
} | ||
@@ -13,0 +11,0 @@ const { fixtureId } = fixtureSelection; |
@@ -11,3 +11,6 @@ 'use client'; | ||
const { fixtureId } = msg.payload; | ||
setSearchParams({ fixtureId }); | ||
setSearchParams({ | ||
fixtureId, | ||
key: (searchParams.key ?? 0) + 1, | ||
}); | ||
} | ||
@@ -19,4 +22,10 @@ else if (!searchParams.locked && | ||
} | ||
}), [rendererConnect, rendererId, searchParams.locked, setSearchParams]); | ||
}), [ | ||
rendererConnect, | ||
rendererId, | ||
searchParams.key, | ||
searchParams.locked, | ||
setSearchParams, | ||
]); | ||
return React.createElement(React.Fragment, null, children); | ||
} |
@@ -9,7 +9,7 @@ import React, { Suspense } from 'react'; | ||
export function ServerFixtureLoader({ searchParams, moduleWrappers, globalDecorators, renderMessage = defaultRenderMessage, }) { | ||
const { fixtureId = null } = decodeRendererSearchParams(searchParams); | ||
const { fixtureId = null, key = 0 } = decodeRendererSearchParams(searchParams); | ||
const fixtureSelection = fixtureId && { | ||
fixtureId, | ||
initialFixtureState: {}, | ||
renderKey: 0, | ||
renderKey: key, | ||
}; | ||
@@ -16,0 +16,0 @@ return (React.createElement(ServerFixtureChangeListener, null, |
{ | ||
"name": "react-cosmos-renderer", | ||
"version": "6.0.0-canary.1507195.0+1507195", | ||
"version": "6.0.0-canary.046251b.0+046251b", | ||
"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.0-canary.1507195.0+1507195", | ||
"react-cosmos-core": "6.0.0-canary.046251b.0+046251b", | ||
"react-is": "^18.2.0" | ||
}, | ||
"gitHead": "150719572ee7a2b8da6db654ffc5e8018ebaefc0" | ||
"gitHead": "046251ba11ee5e090e0974fe0192fcd3b5ea9912" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
71033
1528