type PropsType = {
something: string;
}
const SomeComponent = (props: PropsType) => {
// eslint-plugin-solid complains with the following
// warning:
//
// This function should be passed to a tracked scope
// (like createEffect) or an event handler because it
// contains reactivity, or else changes will be
// ignored solid/reactivity
const handleInput = (value: string) => {
print(props.something, value);
}
return (
<input onClick={(event) => handleInput(event.currentTarget.value)} />
);
}
type PropsType = {
something: string;
}
const SomeComponent = (props: PropsType) => {
// eslint-plugin-solid complains with the following
// warning:
//
// This function should be passed to a tracked scope
// (like createEffect) or an event handler because it
// contains reactivity, or else changes will be
// ignored solid/reactivity
const handleInput = (value: string) => {
print(props.something, value);
}
return (
<input onClick={(event) => handleInput(event.currentTarget.value)} />
);
}