Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
82 views

Can I use both redux and flux in single react native project?

I am new to react native. Could any one please suggest me, can I use both flux and redux in a single app?
Saismita's user avatar
0 votes
1 answer
426 views

RNRF - Actions.popTo failed: "called with an unknown routeName"

Library Version "react-native-router-flux": 4.1.0-beta.4 "react": "16.8.3", "react-native": "^0.59.9" I tried to call Actions.popTo(sceneKey) but it give popTo called with an unknown routeName:...
Izzuddiin's user avatar
  • 265
10 votes
1 answer
15k views

Should I define model classes in React?

React uses Flux architecture and it is said in https://reactjs.org/docs/thinking-in-react.html that React has two models - state and props. And there are some suggestions for model management in React ...
TomR's user avatar
  • 3,016
0 votes
1 answer
513 views

React native bidirectional data flow?

I worked with ReactJS and flux. They are to used to build web based applications. And flux is used to enhance the way to data flow providing bidirectional data flow. I start learning react native ...
Kushal Jain's user avatar
  • 3,176
3 votes
2 answers
3k views

React Native Images for Multiple Screens

I have an image which I want to display in top half of my screen. I'm using flux like this. <View style={{flex:0.5}}> <Image style={{width:...
Muhammad Ahsan's user avatar
1 vote
3 answers
1k views

Redux: Accessing current state - best practice?

Here is something I don't understand about Redux. I have an app which goes through items. You can go to the previous item and to the next item. As I understand it, you are not supposed to access the ...
R. Kohlisch's user avatar
  • 3,013
3 votes
1 answer
2k views

React/Redux: On Hover of one Component, change color of all Components

Let <Word /> be a simple functional component (without state) which takes a few props and displays a word. <Word group={1} /> <Word group={2} /> <Word group={2} /> <Word ...
R. Kohlisch's user avatar
  • 3,013
1 vote
0 answers
216 views

React-native: Is it possible to use pure Flux with React Native and not its implementations like Redux etc.?

I was trying to get familiarized with React Native by doing a very simple project using React Native. I wanted the code to be clean and following some architecture. I've been using Flux with React for ...
Gautam's user avatar
  • 428
0 votes
1 answer
1k views

React Native Router Flux Tab Navigation does not show Tab Icon for one specific component

I've got a problem with react native router flux navigation. I want to display an icon for my tabs with react-native-vector-icons but for the component {ScreenOverview} it doesn't show the icon. Code:...
Sandro_V's user avatar
  • 540
1 vote
2 answers
1k views

Re-rendering prop data on button press in React

UPDATE #2: I posted the code on JSFiddle for LinksScreen and TimelineDay. Sorry I didn't do that earlier! UPDATE: I re-structed my code using the suggestions of . I am now attempting to update ...
Jonathan Moran's user avatar
1 vote
1 answer
381 views

Change tabbar button behaviour on second press

I'm using router flux in a react native project (0.43.3) How is it possible in the tabbar to just switch the tab when the icon is first pressed and to reset the stack on this tab on second press? ...
Xavier Ojeda Aguilar's user avatar
2 votes
1 answer
137 views

On click on <div>, focus input field - How to do this with React / Redux?

That's basically my question. I have different containers & components. If a certain div is clicked in a certain container or component, I want to set the focus to the input field of a different ...
George Welder's user avatar
1 vote
1 answer
2k views

Filtering Components on React Native

I'm trying to make a filtering checkbox list options to filter out the news to show on a feed. My app isn't yet getting information from database so I'm basically creating by hand to test the methods. ...
Luís Mestre's user avatar
  • 1,929
1 vote
1 answer
136 views

How do "flux" and "redux" relate to "react native" and which of these should a new "react native" start using?

How do "flux" and "redux" and "relay" relate to "react native" and which of these (flux and/or redux and/or relay) do most "react native" developers use. Background: For someone starting up with "...
Greg's user avatar
  • 34.8k
0 votes
1 answer
1k views

ScrollView rendering updated components without data in react-native?

I am having my page inside a ScrollView in react-native app. On first load the child components lets say multiple TextInput's render perfectly fine. Each TextInput has a unique key. When I start ...
Sahil's user avatar
  • 3,358
0 votes
1 answer
39 views

Flux architecture one complex store versus two smaller

What is better solution, make more smaller stores or less bigger. ? For example i have settings, and there are two pages - graphSettings, and productSettings Have i write for them one or two stores? ...
Lukáš Unzeitig's user avatar
0 votes
0 answers
96 views

Object models in flux / redux

So i am learning the flux pattern using redux as a framework for it, to generate a mobile application in react-native (no backend).I feel I have been fighting against the pattern for some time due I ...
Alvaro Lorente's user avatar
1 vote
0 answers
39 views

Local edits and nested datastructures with React + Flux

I have two stores, an EventStore and an InviteStore, each containing a collection of Events and Invites respectively. Events have a one-to-many relationship with Invites, and my backend returns nested ...
fkfjkk's user avatar
  • 11
0 votes
2 answers
147 views

React Native + Flux, unresponsive dispatcher

I'm building my first react-native application. I'm used to building React applications and do so using the Flux MVC pattern. I have (correctly) integrated Flux into my React Native project but the ...
leaksterrr's user avatar
  • 4,147
0 votes
1 answer
1k views

React setState / Flux - Does it always trigger a re-render?

I've been playing around with React Native lately and I reached a point where I became interested in managing my state more properly, as a start achieving a shared state between all the components. ...
user5470921's user avatar
1 vote
0 answers
816 views

Redux getter if store initial state is empty

I was watching a talk about Reactjs/Flux during which they showed a code inside Facebook app that is used to preview user profile picture. Link to the Youtube video. Snippet: class ProfilePicture ...
Momen Zalabany's user avatar
1 vote
1 answer
172 views

getInitialState was defined on Loginpanel(//Name of my component), a plain JavaScript class

Hello i am quite new to react, i try to remove this error, but nothing works for me. Please help me with it. My component is look like this. error is "getInitialState was defined on Loginpanel, a ...
komal deep singh chahal's user avatar
1 vote
2 answers
967 views

global variables(Communication between components in react.js

Is it good idea to use global variables for communication between 2 components in react.js. Or is it bad practice. If no, can somebody explains, whats are the drawbacks of it. Thanks
komal deep singh chahal's user avatar
3 votes
1 answer
561 views

react native router flux Encountered two children with the same key

Version(s) react-native-router-flux v3.31.2 react-native v15.2.1 I don't know what i'm doing wrong but when i try to call Actions.dialog() multiple times, i got this error. I thought this fix https:...
ben's user avatar
  • 31
1 vote
2 answers
523 views

Dynamic inilne style with default StyleSheet React Native

I need to give dynamic inline style with static default stylesheet style. How can I achieve this <View style={[styles.card,{{width:width, height: height}}]}> <View style={...
Waleed Arshad's user avatar
1 vote
1 answer
282 views

Reactjs/Flux/altjs Listen for Store Changes slow down app

i need to update Store on every button click on listView and change button state icon accordingly. unfollowing_ids is an array. componentWillMount: function() { FollowingStore.listen(this.onChange); ...
Waleed Arshad's user avatar
0 votes
1 answer
3k views

React Warning: setState(...) Can only update a mounted or mounting component

I have a problem: I'm building my first app with React/ReactNative + Flux and I obtain this warning: setState(...): Can only update a mounted or mounting component. This usually means you called ...
Alessandro's user avatar
0 votes
1 answer
432 views

Circular module dependencies between stores

In my react native app that tracks instrument practice I have three stores: SessionStore GoalStore InstrumentStore The stores each manage one model (Session, Goal, Instrument) and getting/updating ...
Anders Bornholm's user avatar
0 votes
1 answer
885 views

How to call Actions.xxx in functions binded to onPress event in 'react-native-router-flux'

I'm using RN0.24 and flux3.26. RN version may be out-dated but the Actions.xxx works fine when I'm using onPress={Actions.xxx} However once I put it into functions like onPress={this.function} and in ...
Gerard Taub's user avatar
0 votes
1 answer
458 views

React HandleClick in the parent component

Read React tutorial and docs, can't find any information about action that going in child component <a onClick="{function(){ this.props.handleClick... but declared in parent compnonent. When we ...
nl pkr's user avatar
  • 656
6 votes
2 answers
5k views

React-native navigation experimental example?

I started using react-native few weeks ago. For my first app, I used navigator for the navigation with its navigationbar component to display title and left/right hand side buttons. After reading ...
user2657198's user avatar
1 vote
2 answers
300 views

React Native - Navigation between different views

I just approached to react native/react and are a bit confused...I specify that I have a background with angularjs, cordova, ect...Now I have a problem...I'm reading Flux and I want to use it in my ...
Alessandro's user avatar
1 vote
1 answer
227 views

React native setState on compnonentDidMount doesnt work

I am using flux and trying to setState on componentDidMount within my top component in a React Native app. In the constructor , this.state = MainStore.getData(); seems to be setting the state just ...
Chipe's user avatar
  • 4,791
1 vote
1 answer
326 views

ComponentKit and FLUX architecture - avoid unnecessary re-rendering of the UI

I'm using Facebook ComponentsKit to generate my views. I now am migrating to a "flux" architecture for changing app state and triggering view updates. The main problem I have is that not all state ...
Avba's user avatar
  • 15.2k
3 votes
1 answer
445 views

What is right to use Spread operator or Object.assign in Redux?

I had a little bit of confusion whether to use Spread operator or Object.assign in reducer function to apply changes to the target object. const toggleTodo = (todo) => { return Object.assign({},...
Karthick Kumar's user avatar
3 votes
0 answers
50 views

Flux optimistic updates handled by the library?

Is there some flux library that handles optimistic updates for you? I've heard that Relay library can do that, but it only works with a graphql server (which I don't have). I would love to use a ...
Pavle Lekic's user avatar
  • 1,122
0 votes
1 answer
159 views

React Native - setState Warning on second mount

please check the follow code: componentDidMount() { /* * Add listener * The User has search for a team */ teamStore.addChangeListener("SEARCH_TEAMS", this.updateTeams.bind(this)...
Kenny Wagenknecht's user avatar
0 votes
1 answer
323 views

Update rendered component in ReactNative

I use ReactNative and Flux and didn't follow how to render another one component here UserStore.addChangeListener(function(){}); instead a Form. So, I have a form for login, if login was successful - ...
Bob Napkin's user avatar
0 votes
0 answers
963 views

React Native unmount scene listening to event

I am working on mobile app with React Native and have discovered this weird behaviour using EventEmitter in my project. I am using Flux. In my Scene (Component) I listen to Event as seen below in code:...
George Mylonas's user avatar
0 votes
0 answers
90 views

Working on the same store/state in Redux

What should I do to get Store with the same states in each Component in React-Native? Actually I use createStore in each Component, but this creates a new Store without previous state.
siwymilek's user avatar
  • 815
0 votes
2 answers
56 views

Asynchronously handling data which does not affect the view in React+Flux

I'm writing a React (actually, React Native) application that stores data locally and submits it to a backend for processing. More specifically, it allows a user to place orders for products, and if ...
Lane Rettig's user avatar
  • 6,930
0 votes
2 answers
264 views

react native alt flux cannot bind action to store

I have a LoginActions.js files that looks like this : 'use strict'; import alt from '../alt'; import LoginUtils from '../utils/login'; class LoginActions { loginSuccess(me) { return me; } ...
G. Hamaide's user avatar
  • 7,106
2 votes
0 answers
477 views

React native example - dispatch?

I am going through this example on github. And I still don't get one thing. Why is there this.dispatch() at the start in fetchMessages function? It's working without that as well. So what is the true ...
dfgd's user avatar
  • 455
0 votes
1 answer
160 views

react native flux synchronous dispatch error

I'm building an app using the package alt that can be found here : https://github.com/goatslacker/alt I've got an error on logout action, because of synchronous dispatches I think and I don't ...
G. Hamaide's user avatar
  • 7,106
0 votes
1 answer
48 views

How to work with an JSON response which gives me an Array with Objects to setup my ListView

I have a View Component which has a ListView filled with JSON data. I use FLUX Pattern for my DataFlow. Now when i get a JSON response, "_userNews", which has multiple arrays, with objects inside ...
BigPun86's user avatar
  • 2,666
1 vote
2 answers
3k views

Flux - How to deal with multiple stores updating the same view?

I'm a beginner to the flux model but I think I understand it at a high level: event creator -> events -> dispatch -> store -> view and around we go! Given that the flux model supports multiple ...
Aziz Mamhta's user avatar
0 votes
1 answer
103 views

flux controller-view not subscribing for the event change in store

I want to show a list of messages when the page is loaded. i call action and addChangeListener to subscribe for changes in componentDidMount, hoping i can get the data back from server from store, ...
shangsunset's user avatar
  • 1,615
0 votes
2 answers
45 views

How do I reuse an object used by a number of stores?

I'm developing a react native application using flux which has a number of components and a number of stores. The application uses a javascript SDK which authenticates once against an online rest API. ...
tooba's user avatar
  • 569
0 votes
1 answer
105 views

Pass this.state to children in react-router 1.x / React, Flux

I am performing authentication on my top level route which I have named App in using react-router. My app is using the following <div className="app-wrapper"> <NavbarC currentUser={...
Trey Huffine's user avatar