const usersPosts = useSelector(state => {
const { users, searchValue } = state.reducerFetchUsers
if (!searchValue)
return users
return users.filter((user) => user.name.includes(searchValue))
})
рендерится заново при каждом новом символе в TextInput/TextArea
<android.support.design.widget.TextInputLayout
android:id="@+id/text_input_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Label">
<EditText
android:id="@+id/edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text" />
</android.support.design.widget.TextInputLayout>
UgnaiaVokzalMarhut2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
try {
Intent intent = new Intent(MainActivity.this, Ostanovki2.class);
startActivity(intent);
finish(); <--------------- Удоли
} catch (Exception e) {
} //Конец конструкции
}
});
<Books type="popular"/>
{books.filter((item) => { return item[this.props.type]; }).map((book, index) => (...)