You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i have very long text, then it's cause app too laggy
as you can see, i typed too long text by pressing, the button send is can not able to click ( it' took about 4 second to clickable).
When remove mentions input props from InputText, it's work normaly without lag
Here is my. code:
const { textInputProps, triggers } = useMentions({
value: text,
onChange: setText, ==> I think this line cause laggy, because when every text char typed, it's cause re-render
triggersConfig,
patternsConfig,
})
<TextInput
// value={this.props.text}
maxLength={500}
testID={this.props.placeholder}
accessible
accessibilityLabel={this.props.placeholder}
placeholder={this.props.placeholder}
placeholderTextColor={this.props.placeholderTextColor}
multiline={this.props.multiline}
editable={!this.props.disableComposer}
onChange={this.onContentSizeChange}
onContentSizeChange={this.onContentSizeChange}
onChangeText={this.onChangeText}
style={[
styles.textInput,
this.props.textInputStyle,
{
height: this.props.composerHeight,
...Platform.select({
web: {
outlineWidth: 0,
outlineColor: 'transparent',
outlineOffset: 0,
},
}),
},
]}
autoFocus={this.props.textInputAutoFocus}
enablesReturnKeyAutomatically
underlineColorAndroid='transparent'
keyboardAppearance={this.props.keyboardAppearance}
{...this.props.textInputProps} =====> this line
The text was updated successfully, but these errors were encountered:
Hi, i have very long text, then it's cause app too laggy
as you can see, i typed too long text by pressing, the button send is can not able to click ( it' took about 4 second to clickable).
When remove mentions input props from InputText, it's work normaly without lag
Here is my. code:
The text was updated successfully, but these errors were encountered: