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.

className type error

See original GitHub issue

I created a new project with the expo blank typescript template. Then I followed the Quick start tutorial to implement tailwindcss-react-native.

It works perfectly but unfortunately I get an error with typescript error because of className.

No overload matches this call. #2769 Property 'className' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<View> & Readonly<ViewProps>'. #2772

I use VSCode

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
codymullinscommented, Aug 6, 2022

@binajmen that worked like a charm

tl;dr - create a my-app.d.ts and add the below snippet:

/// <reference types="nativewind/types" />
6reactions
binajmencommented, Jul 14, 2022

If someone is passing by, last recommendation is here: https://www.nativewind.dev/getting-started/typescript

Read more comments on GitHub >

github_iconTop Results From Across the Web

className type error · Issue #77 · marklawlor/nativewind
In my case, I've created app.d.ts and added /// <reference types="nativewind/types" /> but I still get typescript error because of className ...
Read more >
React native typescript giving me an TS error when using ...
I have experienced the same issue, and the simplest fix to include the types is to create a new app.d.ts file and add...
Read more >
"The type or namespace name 'ClassName' does not exist ...
FIX: "The type or namespace name 'ClassName' does not exist" error message when you try to build a Visual C# Windows Form solution...
Read more >
classnames - npm
A simple utility for conditionally joining classNames together. Latest version: 2.3.2, last published: 3 months ago. Start using classnames ...
Read more >
property 'className' does not exist on type 'eventTarget'
I have an event listener to check which element is being clicked. When I click inside the document, I get the result as...
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