Category : react-redux

I am working on an e-commerce mobile application with Node.JS backend and React-Native front end. I have an auth state called isLogged. Also a material-bottom-tab navigator for navigating between screens. In order to use different navigators in a specific tab(in my case to use account tab for both AccountScreen and LoginScreen) inside my tab navigator ..

Read more

The Portal component is being called twice. Why is it happening? How can I prevent that? index.js const App = () => { const theme = lightTheme; return ( <Provider store={store}> <StyleSheetManager> <ThemeProvider theme={theme}> <BrowserRouter> <Portal /> </BrowserRouter> <GlobalStyle /> </ThemeProvider> </StyleSheetManager> </Provider> ); }; ReactDOM.render(<App />, document.getElementById("app")); Portal.jsx class Portal extends React.Component { isAuthenticated ..

Read more

When I login into the user, it has success response, but the action is not passed to the reducer. But while registering a user, it’s working fine. //saga.js import { put, takeEvery, all, call } from ‘redux-saga/effects’; import {getRequest, postRequest} from ‘../../helpers/axiosClient’; import actions from "./actions"; function* registerUserAsync(params) { try { const response = yield ..

Read more

To give a quick rundown of my app, it’s an app where you can take tests, score yourself, and record your scores. It uses Firebase Auth and Firestore and Redux to help do all this. I’m having a problem when it comes to signing out of the user’s account. redux/actions/index.js: import { USER_STATE_CHANGE, CLEAR_DATA, USER_TESTS_COMPLETED_STATE_CHANGE ..

Read more

I am updating initial state based on onchange event passed by textboxes to event handler , as below – import React,{useState} from ‘react’ function ViewAll() { const iCandidateState={ Name:”, Age:”, Qalification:” }; function nameHandler(event){ alert(event.target.value); this.iCandidateState.Name=event.target.value; } return ( <div> <table> <tr> <td> Name </td> <td> <input type="text" name="txtName" value={iCandidateState.Name} onChange={(e)=>nameHandler(e)}></input> </td> </tr> <tr> <td> ..

Read more