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.

typings of usernameStyle on <Bubble {...props} />

See original GitHub issue

Issue Description

The typings of usernameStyle on <Bubble<IMessage> /> aren’t correct. The typings expect a LeftRightStyle<ViewStyle> while it actually should be a TextStyle. (I think) I’m getting crashes when I put in a left: { styles … } or right: { styles … }. image

Steps to Reproduce / Code Snippets

Try the usernameStyle prop on the <Bubble /> with a left or right and the app will crash. However if you put styles directly into the props it works but you get a TS warning.

Expected Results

[FILL THIS OUT]

Additional Information

  • Nodejs version: 12.8.1
  • React version: 16.11.0
  • React Native version: 0.61.5
  • react-native-gifted-chat version: 0.13.0
  • Platform(s) (iOS, Android, or both?): Android
  • TypeScript version: 3.7.3

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
ramonvermeulencommented, Jan 6, 2020

https://github.com/FaridSafi/react-native-gifted-chat/pull/1594

This should probably fix the type error.

1reaction
xcarpentiercommented, Jan 6, 2020

Hi, Thanks. PRs are welcome 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-native-gifted-chat - UNPKG
react-native-gifted-chat/lib/Bubble.d.ts ; 1, import PropTypes from 'prop-types'; ; 2, import React from 'react'; ; 3, import { StyleProp, ViewStyle, TextStyle } ...
Read more >
Mastering Typing React Props with TypeScript - Upmostly
In this article, I'll help you cover typing your React props in TypeScript, as well as some helpful common types to help you...
Read more >
internal z index style in react Code Example - Code Grepper
Answers related to “internal z index style in react”. How to focus on the marker position with zoom in react using react-google-maps ·...
Read more >
Free Printable Bridal Shower Photo Booth Props - Pinterest
I Love You Speech Bubble Prop Party Props, Party Ideas, Photo Booth Props Free. Bianca. 1 follower. More information ...
Read more >
Adobe ColdFusion Cold Fusion 2016 Developing Applications Dev En
many different types of web applications of varying complexity. Using the Developing ColdFusion Applications guide. About Adobe ColdFusion documentation for ...
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