@wixc3/react-simulation
v4.0.0
Published
Library for creation of React component simulations
Downloads
19
Maintainers
Keywords
Readme
@wixc3/react-simulation
Library for creation of React component simulations.
Usage
Given:
// hello.tsx
import React from 'react';
export interface HelloProps {
name: string;
}
export const Hello: React.VFC<HelloProps> = ({ name }) => <div>Hello ${name}</div>;
This library can be used to create simulations for Hello
:
// hello.sim.tsx
import { createSimulation } from '@wixc3/react-simulation';
import { Hello } from './hello';
createSimulation({
name: 'basic simulation',
componentType: Hello,
props: { name: 'World' },
});
License
MIT