Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

146
Views
El tipo de elemento JSX 'GlobalStyle' no tiene ninguna construcción o firma de llamada

Estoy configurando componentes con estilo y recibo este error. Uso preact en este proyecto y lo compilo ini vite.js.

El tipo de elemento JSX 'GlobalStyle' no tiene ninguna construcción ni firma de llamada.

¿Cómo puedo hacer que funcione?

Main.tsx: este es el archivo donde aparece el error

 import { render, Fragment } from "preact"; import { App } from "./app"; import { GlobalStyle, Theme } from "./styled"; render( <Fragment> <GlobalStyle /> <Theme> <App /> </Theme> </Fragment>, document.getElementById("app")! );

GlobalGlobalStyle.ts

 import { createGlobalStyle } from "styled-components/macro"; export const GlobalStyle = createGlobalStyle` html { box-sizing: border-box; font-size: 16px; } `;

Mi configuración ts

 { "compilerOptions": { "target": "ESNext", "useDefineForClassFields": true, "lib": ["DOM", "DOM.Iterable", "ESNext"], "allowJs": false, "skipLibCheck": true, "esModuleInterop": false, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, "module": "ESNext", "moduleResolution": "Node", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "preserve", "jsxFactory": "h", "jsxFragmentFactory": "Fragment", "baseUrl": ".", "paths": { "react": ["node_modules/preact/compat/"], "react-dom": ["node_modules/preact/compat/"] } }, "include": ["src"], "references": [{ "path": "./tsconfig.node.json" }] }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!