
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@simpozio/split-test
Advanced tools
React component for A/B-testing of components.
npm i @simpozio/split-test
import SplitTest from '@simpozio/split-test';
const Component = () => {
return (
<SplitTest>
<SplitTest.Variant name="A">
Variant A
</SplitTest.Variant>
<SplitTest.Variant name="B">
Variant B
</SplitTest.Variant>
</SplitTest>
)
}
import SplitTest, {locationStateReducer} from '@simpozio/split-test';
const Component = () => {
return (
<SplitTest stateReducer={locationStateReducer}>
<SplitTest.Variant name="A">
Variant A
</SplitTest.Variant>
<SplitTest.Variant name="B">
Variant B
</SplitTest.Variant>
</SplitTest>
)
}
import SplitTest, {locationStateReducer} from '@simpozio/split-test';
const Component = () => {
const [variant, setVariant] = useState('A');
const customStateReducer = () => variant;
const handleChange = () => setVariant(variant === 'A' ? 'B' : 'A');
return (
<>
<button onClick={handleChange}>Change variant</button>
<SplitTest stateReducer={customStateReducer}>
<SplitTest.Variant name="A">
Variant A
</SplitTest.Variant>
<SplitTest.Variant name="B">
Variant B
</SplitTest.Variant>
</SplitTest>
</>
)
}
SplitTest
component accepts only one optional property:
stateReducer: (variants: string[]) => string
- state reducer is a function that controls logic of changing between variants, it accepts all variants as prop and returns single variant that should be rendered;SplitTest
component will ignore all children except SplitTest.Variant
SplitTest.Variant
component accepts prop:
name: string
- it neccessary for identifying variants inside the SplitTest component and stateReducersrandomStateReducer
- default state reducer, it will render random variant on page update;locationStateReducer
- render variant based on location query parameter 'variant', e.g. '?variant=B' for rendering variant B;FAQs
Component for A/B testing of new features and components
We found that @simpozio/split-test demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.