我想获取远程数据,这个数据是JSX模板。我想使用这些数据动态渲染html。
答案 0 :(得分:0)
var Input = require('./components/input.jsx')
var Button = require('./components/Button.jsx')
var Panel = require('./components/panel.jsx')
var Container = require('./components/container.jsx')
var Styles = require('./components/styles.jsx')
var Style = require('./components/style.jsx')
var LoadData = require('./lib/LoadData');
LoadData.load('life_nearby_food', function(string){
// string may be link "<Container><Layout orientation="vertical" width="fill" height="wrap">...</Layout></Container>" etc
var app = React.createClass({
render: function() {
return string;
}
});
});