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