Injecting Component name into tag in React

This has been asked before, but the solutions don't seem to be working for me... maybe because I am conditionally rendering? The idea is that I have choices for the user to click on, and then the appropriate component is rendered onClick. So I want...
more »

2017-10-03 17:10 (2) Answers

How to update the state of reducer?

I'm passing the index (id) of the object in posts array in the state to be updated. I'm able to find the index of the element with findIndex and change the number key. I'm not able to figure out how do I pass the updated object back to the state/arra...
more »

2017-10-01 20:10 (1) Answers

Accessing Redux Store in a Util file

TLDR: I want to be able to grab the latest Redux State in an external "Util" file. How can I do this? Say I have a playlist.. and in many different areas of the app, you can "Start" the playlist. So in a "Util" file I have the "startPlaylist" fu...
more »

2017-09-29 00:09 (2) Answers

Pass variables to redux

I'm trying to pass two variables (strings) into a redux action. The purpose of this is the component knows the ID of the Company Profile it's trying to look up and we are getting that data using redux because this pattern is used in a couple places. ...
more »

2017-09-27 19:09 (1) Answers

Distribute Props to Each Screen

I'm getting this JSON response from API in React Native. [ { "cloth_image": "https://ox0%3es", "id": 7, "big_cloth_type": "t" }, { "cloth_image": "https://qM%3D&", "id": 8, "big_cloth_...
more »

2017-09-26 14:09 (2) Answers

Knowing when the UI is ready in React / Redux

I would like to know how long it takes my app to become "ready" for the user to interact with it. The timeline of the app loading includes the following: DOM load. Initial React render. HTTP calls triggered from various componentDidMount()s HTTP ca...
more »

2017-09-25 22:09 (0) Answers

Material-UI dialog overlay?

I'm using the React-Redux Material-UI package: I'm trying to add a grey overlay over the entire dialog component with a circular indicator after the user logs in. Attempting to do this in the dialog bo...
more »

2017-09-23 03:09 (1) Answers

Results nesting into array

I'm using ReactNative + React Redux. My Reducer: const initialState = { categories: [] } case "FETCHING_SUCCESS": return { ...state, isAdding: false, categories: [...state.categories,] } The ...
more »

2017-09-22 17:09 (2) Answers

React how to set a default value

Hello I'm new to react and redux. What I'm trying to do is have an edit page that gets the value from my server and puts it in an input value so the user can edit the value. <FormGroup> <Label htmlFor="name">Name *</Label> ...
more »

2017-09-19 01:09 (1) Answers

Calling function in render not working

Unable to call a function from within render. My component is: class MyComp extends Component { componentWillMount() { this.props.getUsers(); }; getUsersfunction(users){ return( console.log("i was called");, ...
more »

2017-09-15 19:09 (5) Answers

React redux bindActionCreators usage

i have a file inside action directory which is root.js. Root.js will compile all the others action inside, and i bind it with bindActionCreators export const all = (store) => { AUTH: bindActionCreators(AUTH.actions, store.dispatch), ....:...
more »

2017-09-14 11:09 (2) Answers

Reactjs, Redux - redux-persist

I am working on a reactjs/redux application - and using a Java Spring Boot codebase acting as an api. I've got a login system in place - but I notice that when I refresh the page -- the authentication state is lost. I've added redux-persist, but i...
more »

2017-09-14 01:09 (1) Answers

Change style onPress + Redux

I want to change the style of the entire app when a button is pressed. I thought I can do this with a reducer. So I created: ReducerStyles: const initialState = { name: styleNormal, path: './styles/styleNormal' ...
more »

2017-09-13 15:09 (1) Answers