Having mess when setState fires and
props
value=""
placeholder="Placeholder"
label="Label"

| software | version
| --------------------- | -------
| react-native-paper | ^2.1.2
Can you post your code and steps to reproduce? Also can you try master if it still happens?
code
import React, { Component } from 'react';
import { View, Keyboard } from 'react-native';
import { TextInput, Button } from 'react-native-paper';
export default class Settings extends Component {
state = {
error: null,
};
render() {
const { error } = this.state;
return (
<View style={{ marginTop: 100 }}>
<Button
mode="contained"
onPress={() => {
Keyboard.dismiss();
this.setState({ error: 'Required' });
}}
>
Test
</Button>
<TextInput
label="Email"
placeholder="Placeholder"
error={error}
/>
</View>
);
}
}
Steps to reproduce:
you can handle this by checking if there is an error or not on placeholder props like that:
<TextInput
label="Email"
placeholder={!error ? "Placeholder" : null}
error={error}
/>
Most helpful comment
code
Steps to reproduce: