@saync/react
v0.1.0
Published
React SDK for Saync — declare expectations on Button, Input, Form, Image, Link, and 30+ other components.
Downloads
175
Maintainers
Readme
@saync/react
React SDK for Saync. Wrap your interactive elements and declare what they should do — the agent verifies, the dashboard reports.
Most users install saync-web and import the components via saync-web/react. This package is the source of truth and a valid direct dependency too.
import { SayncButton } from '@saync/react';
export function AddToCartButton({ onClick }) {
return (
<SayncButton
onClick={onClick}
expect={{
onClick: {
apiCall: {
method: 'POST',
url: '/api/cart',
expectedStatus: 200,
maxDuration: 500,
},
},
}}
>
Add to cart
</SayncButton>
);
}Ships 30+ wrapped primitives (Button, Input, Form, Image, Link, Select, Checkbox, RadioGroup, Slider, …). See the docs for the full list.
MIT licensed.
