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.

Passing custom text component throws an error in TypeScript

See original GitHub issue

Whenever a custom component is passed to the textComponent prop, TypeScript throws the following error:

Screenshot 2022-01-05 at 9 25 28 PM

Stack details: Expo SDK 44.0.0 React Native v0.64.3 React v17.0.1 TypeScript v4.3.5

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
WrathChaoscommented, Jan 5, 2022

Hello again @dmahajan980

I think I fixed it and fixed many more.

Can you please try the new release: 2.1.10

1reaction
WrathChaoscommented, Jan 6, 2022

@dmahajan980

You can use iconImageStyle with tintColor style 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

reactjs - Typescript error with custom Typography component
I have created a rather basic typography component for my React application and it's throwing a Typescript error which i must admit is...
Read more >
Custom errors, extending Error - The Modern JavaScript Tutorial
JavaScript allows to use throw with any argument, so technically our custom error classes don't need to inherit from Error .
Read more >
Improving TypeScript error handling with exhaustive type ...
Throwing custom errors using try...catch. Creating custom errors and throwing them is a better option than returning null because we can achieve ...
Read more >
Error - JavaScript - MDN Web Docs - Mozilla
Error objects are thrown when runtime errors occur. The Error object can also be used as a base object for user-defined exceptions.
Read more >
Creating Custom Errors in JavaScript - YouTube
Did you know that you can create your own custom Error objects in JavaScript ? This can be accomplished with both the older...
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