1d
accepted Unable to update state within componentWillReceiveProps method
1d
revised Unable to update state within componentWillReceiveProps method
added 152 characters in body
1d
comment Unable to update state within componentWillReceiveProps method
So i basically added var _this = this; outside the _.each and refered to _this which solved the problem. Now another problem that i'm experiencing is multiple setState within my loop which is not being updated in the render. How can i overcome this problem with a componentWillReceiveProps function? Do i need to force updates?
1d
asked Unable to update state within componentWillReceiveProps method
Feb
24
comment Only update component when state has been set with ReactJS [Solved]
@julen, i lost you at modify your success handler. A small snippet would be awesome in an potential answer. Cheers.
Feb
24
awarded Popular Question
Feb
23
comment SMBus/I2C in Python keeps triggering receive callback when requesting read
Basically the only thing that onRequest does is sending data which is fetched from a IMU. The IMU data is read in the main-loop. I basically only experience this issue when i do a write and read after each other. If i read continuously theres no issue at all.
Feb
23
comment SMBus/I2C in Python keeps triggering receive callback when requesting read
I still have an issue here. I need to put a small delay between the write and read before i receive anything useful. Should the timing not be set by the clock frequency of the I2C?
Feb
23
asked Unable to upload sketch after bootloader has been flashed on Arduino Micro
Feb
23
comment Only update component when state has been set with ReactJS [Solved]
@julen, can you point to an example by any chance?
Feb
22
comment Only update component when state has been set with ReactJS [Solved]
@HorsSujet, of course, i will wait for a alternative solution such as the one julen mentioned.
Feb
22
revised Only update component when state has been set with ReactJS [Solved]
deleted 17 characters in body
Feb
21
comment Only update component when state has been set with ReactJS [Solved]
@julen, can you kindly show an example of how to do this properly?
Feb
21
revised Only update component when state has been set with ReactJS [Solved]
deleted 48 characters in body
Feb
21
comment Only update component when state has been set with ReactJS [Solved]
Ah found the error! Check out my setState
Feb
21
comment Only update component when state has been set with ReactJS [Solved]
Well something is definitely wrong. When the data has been fetched the array becomes an object instead. Which doesn't look right to me..
Feb
21
comment Only update component when state has been set with ReactJS [Solved]
Check my code. I did the update and it looks like the correct behaviour, except that it keeps complaining about var componentItems = this.state.components.map(function (component) with Uncaught TypeError: undefined is not a function. As far as i can see the components array is populated?! :-/
Feb
21
revised Only update component when state has been set with ReactJS [Solved]
deleted 145 characters in body
Feb
21
comment Only update component when state has been set with ReactJS [Solved]
@DhirajBodicherla, so the state will be the actual date?
Feb
21
comment Only update component when state has been set with ReactJS [Solved]
That is correct..
1 2 3 4 5