Posts by Ruan Duarte • 146 points
25 posts
-
1
votes1
answer108
viewsA: Implement radio Buttons using the unform library
I made some changes here in the code the App was as follows: export default function App() { function handleSubmit(data: any) { console.log(data); } return ( <> {data.map((n) => { return (…
-
1
votes1
answer40
viewsA: Disable button in React via validation
Hello, I made a small change to your code. I added the regex email before the function Follow the code of the regex let REGEX_EMAIL =…
-
1
votes1
answer21
viewsA: I cannot bring the data of the array that is showing on the console
Probably you are using the map in the wrong way or I do not know this way described there... I would use it this way {data.map((item, index) => { return ( <li key={index}…
reactanswered Ruan Duarte 146 -
0
votes1
answer81
viewsA: React component array with Typescript(.tsx)
import React, { useState, useEffect } from 'react' import Data from 'data.json' interface Tarefa { materia: string, local: string, descricao: string, data: string } interface TarefaProps { tarefa:…
-
3
votes1
answer30
viewsA: Control inputs React
if you observe the switch documentation of the ui. It is very clear how to make this transition from checked. return ( <Switch checked={checked} onChange={(e) => { setChecked(e.target.checked)…
-
-1
votes1
answer420
viewsA: Clear field after Submit with Redux and Redux-form
Hello, I’ll give you an example of me that I have in an application ready and you adjust the code for you: Below goes my return: case LOGOUT_USER: return { ...state } case LOGOUT_USER_SUCCESS:…
-
0
votes1
answer31
viewsA: Want to open two separate menus in my app?
import { createStackNavigator, createAppContainer, createSwitchNavigator, createDrawerNavigator } from 'react-navigation'; import LoginScreen from './screens/LoginScreen'; import…
-
0
votes1
answer219
viewsA: React Native - Appregistry.registerComponent with Provider
Iae, I have a code ready and it works perfectly. import React, { Component } from 'react'; import { Provider } from 'react-redux'; import { createStore, applyMiddleware } from 'redux'; import…
-
0
votes1
answer982
viewsA: Paging of a large array in reactJS
Well, I got it this way import React, { Component } from 'react' import ReactPaginate from 'react-paginate' const users = [ { name: 'DD' }, { name: 'Ruan' }, { name: 'Reginaldo' }, { name: 'Renan'…
-
0
votes1
answer789
viewsA: React-Native project does not work on mobile and nor on emulator command React-Native run-android while running appears this error below
Make sure you are doing everything correctly: First build on android-studio to check the project. Then go to your terminal and in your project folder enter the android folder: android cd After…
react-nativeanswered Ruan Duarte 146 -
0
votes1
answer43
viewsA: My Drawer opens but does not display pages, such as displaying my pages in Drawer Navigator (React Native)
Iae, I’ll give you a simple example... const FairScreenStack = createStackNavigator({ MainScreen: { screen: FairScreen, navigationOptions: ({ navigation }) => ({ gesturesEnabled: false, header: (…
-
0
votes1
answer773
viewsA: Add Icon with React Activate Material UI Button
I’ll give you the suggestion to use the import Icon from 'react-native-vector-icons/FontAwesome' <Icon name='heart' size={30} color='white'/> Look for the desired icon in this directory If…
-
0
votes1
answer424
viewsA: Problem when placing a Stacknavigator inside the Drawernavigator
I’ll give you an example of a project of mine, ok? import { createStackNavigator } from 'react-navigation-stack' import { createAppContainer, createSwitchNavigator } from 'react-navigation'; import…
-
-2
votes1
answer982
viewsQ: Paging of a large array in reactJS
I’m pulling an array with a size of about 20,000. However, at paging time, all available pages appear in my paging field. But I wanted to narrow it down, so that only three numbers and like, 1 2 3…
-
0
votes1
answer21
viewsA: Materialbottomtabs - Outside the screen boundary
Put the code, there’s no way to know just with the screen view!
-
0
votes1
answer1105
viewsA: Image does not appear in Flatlist React Native
Call the image that... const DATA = [ { image: source={require('./luz.png')}, id: '3', [...] Try pulling it this way... <Item image={{uri: item.image}} [...]…
-
0
votes1
answer195
viewsQ: Sort method of my flatList
<FlatList style={{backgroundColor: 'white', marginTop: 10}} data={this.state.progr.data.sort((a, b) => a.start_time > b.start_time).filter(x => x.period ===…
-
0
votes1
answer411
viewsA: Sort my flatList by the hour
Can do it this way: data={this.state.progr.data.sort((a, b) => a.start_time > b.start_time).filter(x => x.period === '2019-10-16T00:00:00.000-03:00')}
-
0
votes1
answer411
viewsQ: Sort my flatList by the hour
I am filtering my flatlist by date (period), but want to put the hours in ascending order: <FlatList style={{backgroundColor: 'white', marginTop: 10}} data={this.state.progr.data.filter(x =>…
-
0
votes2
answers285
viewsA: How to use 'filter' in a flatlist (json API)
I was able to adapt it as follows: <FlatList style={{backgroundColor: 'white', marginTop: 10}} data={this.state.progr.data.filter(x => x.period === '2019-10-17T00:00:00.000-03:00')}…
-
0
votes2
answers285
viewsQ: How to use 'filter' in a flatlist (json API)
The api has the date as follows: "period": "2019-10-19T00:00:00.000-03:00", Pull my flatList like this: componentDidMount() { console.log(this.props.navigation) this.loadData(); } async loadData() {…
-
-3
votes1
answer46
viewsQ: How do I return the date?
renderItem = ({item}) => { return( <TouchableWithoutFeedback onPress={()=> this.setState({isItemVisible: true, modalData: {...item}})}> <View style={{ flexDirection: 'row', flex: 1,…
-
0
votes1
answer512
viewsQ: Routes with undefined parameters
I have a Flatlist where each card directs me to a new screen: render() { return ( <TouchableWithoutFeedback onPress={ () => this.props.navigation.navigate('Post', { "title":…
-
0
votes1
answer31
viewsQ: Want to open two separate menus in my app?
I have a tab that opens my drawer: <Tab NavMenu={() => this.props.navigation.openDrawer()} NavProfile={() => this.toggleOpenProfile()} /> In my navigation it’s like this const AppDrawer…
-
0
votes1
answer200
viewsQ: I want to put a different style on my first React-Native Flatlist item
class Card extends Component { render() { return ( <TouchableWithoutFeedback onPress={() => this.props.navigation.navigate('Post', { "title": this.props.item.title, "body":…
react-nativeasked Ruan Duarte 146