I have this ajaxify form which submits the data well, however I want to pass data from this ajax code to a React component to update the view after successfully submitting the data. How do I pass some data to React using a function?
When using the code below it gives me 'unidentified function', how can make it accessible to both ajax and React?
$('#upload').ajaxForm({
success: function(data) {
newlocal(data);
}
});
And this is the React code I use:
var Postlist = React.createClass({
getInitialState: function(){
return {posts: []};
},
newLocal : function(data){
alert(data);
},