All Questions

147
votes
3answers
49778 views

How can I display a modal dialog in Redux that performs asynchronous actions?

I'm building an app that needs to show a confirm dialog in some situations. Let's say I want to remove something, then I'll dispatch an action like deleteSomething(id) so some reducer will catch that...
2
votes
2answers
592 views

How does connect work without mapDispatchToProps

I was reading the example docs for redux and I found this example of a container component. Can someone explain why in this case mapDispatchToProps is not needed here. As well, how is the function get...
3
votes
2answers
639 views

Load images based on dynamic path in ReactJs

I'm trying to display images in a shopping cart i'm making but its not showing up. Do i have to import each image? I know my paths are fine because it worked before.I think there might be something wr...
3
votes
3answers
403 views

How to reset TabNavigator when user logs out (from other screen)

Here is my project file hierarchy RootTabNavigator | AuthStackNavigator // I want to go back to this navigator | AuthoScreen | Welcome Screen | MainTabNavigator // I want to res...
2
votes
1answers
1097 views

Changing the layout of a component depending on Redux state

I'm developing a course scheduling application in react, and I'm using it as a chance to learn redux. There's a browse menu (implemented as the Browse component) that I'm currently designing and it di...
1
votes
1answers
122 views

Getting error Cannot read property 'setState' of undefined

I'm new with Reactjs. I'm trying to do something very simple: update a div inside a render function when the user change the text inside text area. Any suggestions? class HTMLEditor extends Reac...
74
votes
6answers
47780 views

Understanding React-Redux and mapStateToProps

I'm trying to understand the connect method of react-redux, and the functions it takes as parameters. In particular mapStateToProps. The way I understand it, the return value of mapStateToProps will ...
64
votes
5answers
25988 views

What is the best way to access redux store outside a react component?

@connect works great when I'm trying to access the store within a react component. But how should I access it in some other bit of code. For eg: let's say I want to use an authorization token for crea...
8
votes
3answers
1300 views

React Router work on reload, but not when clicking on a link

I have setup the React with react-router version 4. The routing works when I enter the URL directly on the browser, however when I click on the link, the URL changes on the browser (e.g http://localho...
1
votes
2answers
228 views

Editable Form ReactJS

import React, { Component } from 'react'; let _ = require('lodash'); import {bindActionCreators} from "redux"; import {connect} from 'react-redux'; import {fetchedBeaconsEdit} from '../../...

Previous Next