question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow JSX pragmas (enable editing of tsconfig)

See original GitHub issue

Hi @EricSimons @apai4!

This project looks amazing. I tried to create a simple starter for Hyperapp, but it keeps telling me that React is not defined.

I tried using the JSX pragma like this: /** @jsx h */, but it made no difference.

See: https://hyperapp.stackblitz.io

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
EricSimonscommented, Aug 6, 2017

@jbucaran thanks for the kind words! And absolutely — ability to edit TSConfig/etc should be landing soon, so that should allow you to do this: https://github.com/Microsoft/TypeScript/issues/9582#issuecomment-260118063

Will circle back once we open up editing of TSConfig! 👍

2reactions
Hakuzcommented, Nov 10, 2018

Looks like this adding /** @jsx h */ before import is working now. So if you’re getting the react is not defined please do this.

/** @jsx h */ 
import { h, app } from 'hyperapp'

Read more comments on GitHub >

github_iconTop Results From Across the Web

TSConfig Reference - Docs on every TSConfig option
Enabling the option allows importing JSON, and validating the types in that JSON file. ts. // @filename: settings.json. {. "repo" ...
Read more >
Render rich controls with JSX (and TypeScript)
Step 1: Install the TypeScript definitions · Step 2: Enable JSX compilation · Step 3: Create a tsx file for the controls ·...
Read more >
Custom elements in React using a custom JSX pragma
Example using a custom JSX pragma for enable better tooling for custom elements ... A element, by definition and spec, cannot accept complex ......
Read more >
TypeScript | Preact: Fast 3kb React alternative with the same ...
If you use TypeScript within a Babel toolchain, set jsx to preserve and let Babel handle the transpilation. You still need to specify...
Read more >
Cannot use JSX unless the '--jsx' flag is provided
However, I am still getting the error when I am trying to edit .tsx files. Below is my tsconfig file. { "compilerOptions": {...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found