Closed
Description
I'm using React-Router in order to generate links to route to dynamically-generated routes in a dynamically generated template area. Here's the code:
`ajax('GET','/content/template/'+template+'/master.html',function(tmp){
document.getElementById('template').innerHTML = tmp;
var mop = document.getElementsByClassName("menu");
for (var i = 0; i < mop.length; i++) {
if(!mop[i].getAttribute('menu-name')){
mop[i].innerHTML = '<li><a>Menu not found.</a></li>';
return;
}
var mitems = menus[mop[i].getAttribute('menu-name')];
for(var item in mitems) {
React.render(<Link to={mitems[item].route}>{mitems[item].text}</Link>, getAllElementsWithAttribute('menu-name',mop[i].getAttribute('menu-name'))[0]);
}
}
});`
All is well, and works well, until the final line of code, namely:
React.render(<Link to={mitems[item].route}>{mitems[item].text}</Link>, getAllElementsWithAttribute('menu-name',mop[i].getAttribute('menu-name'))[0]);
where, as I have seen in #400, and #513, gives
From what I have seen, this is a bug with context, however there are no cloneWithProps() in my application, and nothing seems that out of the ordinary. Any help with workarounds would be appreciated
Metadata
Metadata
Assignees
Labels
No labels