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.

no-raw-text does not properly consider Animated.Text

See original GitHub issue

The following code:

<Animated.Text>Some Text</Animated.Text>

Triggers this error:

 error  Raw text Some Text cannot be used outside of a <Text> tag  react-native/no-raw-text

This should not create an error as Animated.Text is a Text tag

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

14reactions
ahartzogcommented, Apr 5, 2019

You can add this to your .eslintrc for a short term fix @holden-caulfield

‘react-native/no-raw-text’: [ 2, { skip: [‘H1’, ‘H2’, ‘H3’, ‘Animated.Text’], }, ],

I use NativeBase so the h1, h2, h3 also fit this

I agree the rule needs to be adjusted to fix these by default rather than needing the skip setup though.

3reactions
njdancercommented, Jun 23, 2019

I know this change has already been merged so maybe this should be brought up in a new issue but, am I the only one who would like some kind of wildcard matching?

Ideally I’d like an option to suppress errors if the component name ends with Text. There are a number of places in my code where I will use styled to create various Text components with different styling. The names can vary but generally always end with Text. There may be reasons why this shouldn’t be the default behaviour but as an opt-in I can’t see it causing any pain. Another option would be to allow regex to be passed to skip.

Happy to have a look at implementing this if it’s likely to get merged.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue with animated text not wiping in correctly
Hi all, I have a project which was started in Storyline 2 and have since brought into Storyline 3, and now there is...
Read more >
Animated Text Spacing | After Effects Tutorial - YouTube
In this After Effects tutorial, learn how to animate text spacing (tracking or kerning) and use dynamic linking to bring your composition ...
Read more >
How to Add Animation to Text (Without After Effects) - YouTube
In this video, you'll learn how to easily create animated text without using After Effects. Try our animated text maker ...
Read more >
Animating text in After Effects
Animate the Transform properties, as you would any other layer, to change the entire layer, not its text contents. Apply text animation presets....
Read more >
How to animate/transition text value change in SwiftUI
If you want to fade out the old value as well, it won't be that hard to customize the modifier. Also since your...
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