#what is the default return type of a qwik component ?

2 messages · Page 1 of 1 (latest)

agile tundra
#

This is a basic component in qwik that i have

import { useSignal, component$ } from '@builder.io/qwik';

const Counter = component$(() =>
{
  const counter = useSignal(0);

  return <button onClick$={() => counter.value++}>{counter.value}</button>;
});

export { Counter };

i get this eslint error about the return type of the function, i put the image in this post

so what usually i do un react/solid or other framework is put something like this

const Counter = component$((): JSX.Element => ......

but this dont work because Qwik dont use JSX as a type, so what is the deafult type for qwik components ?

raw scaffold
#

That problem is on signal not components 🤔