reactjs


React js setstate not working on much browsers


I'm stuck with setstate in reactjs. Initially I was implementing as
var versions = [1,2,3,4];
this.setState({
options: versions
});
The above code is working fine in Google Chrome but in IE 10 and Firefox it not working.
Later I changed to :
var oState = {}
oState['options'] = versions;
this.setState(oState);
But the issue didn't resolved. Both the code is only working in Google Chrome not in other browsers.
Please do let me know how can I solve this issue.
Have you tried to declare first your options in the state of the constructor?
constructor() {
super();
this.state = {
options: null
}
}
But i'm not sure if it solves your problem.

Related Links

React and Google's autocomplete Service and fetching zipcodes
Populating FieldArray based on a JSON file uploaded
componentDidMount not called
ReactJS component not rerendering when props are passed
React Redux … syntax error
How does one set the tabIndex attribute on a draft-js instance?
ComponentDidMount() not working
UIScrollView Canvas Equivalent?
ReactJS - props or propTypes?
React Router V4 structure
Should a view be ordering data?
Unable to load React class component inside other class component
How to get history on react-router v4?
Redux react immutable setIn element changes whole list
react: fade-in/slide-in animation when render component
ReactJS component vendors

Categories

HOME
qlikview
skype-for-business
ckan
stata
sip
cluster-analysis
windows-server-2008
window.open
latex
psexec
opacity
sitemap
mamp
chef-recipe
hdf5
eclipse-orion
loss
internet-explorer-7
smooth-scrolling
passbook
hl7-fhir
summernote
git-branch
ejb-3.1
gnu-screen
beaker-notebook
wai-aria
rvm
functional-dependencies
aspxgridview
suitescript
windows-mobile
cloudformation
ds-5
hippocms
outlook-2010
abide
motion
mediastream
susy
compiled-query
contenteditable
definition
gige-sdk
playframework-2.3
xamarin-test-cloud
kendo-scheduler
node.js-client
blitz3d
fileopendialog
zsh-completion
x12
jira-agile
weblogic-maven-plugin
transaction-isolation
web-optimization
custom-build-step
dcast
cascading
app-data
exchange-server-2007
traminer
borland-c++
photogrammetry
veeam
backtrace
method-overloading
disparity-mapping
parallel-port
power-management
slimscroll
surfaceview
dylan
kendo-window
tlbimp
forward-declaration
proj4
select2-rails
coinbase-php
cloudmade
blotter
setcookie
libx264
invalidoperationexception
custom-cursor
sup
systrace
django-admin-tools
jmesa
nsundomanager
code-organization
log-shipping
lwp
mediastreamsource
glassfish-embedded
hp-trim
dynamic-scope
office-2003

Resources

Encrypt Message