You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<html><head><scriptsrc="/js/magery-compiler.js"></script><scriptsrc="/js/magery-patcher.js"></script><scriptsrc="/js/redux.js"></script><templatedata-tagname="app-title"><h1>{{text}}</h1></template></head><body><app></app><script>varcomponents=MageryCompiler.compile('template');// create a storevarstore=Redux.createStore(function(state,action){if(typeofstate==='undefined'){return{title: "fuck mennn",count: 0};}switch(action.type){case'INCREMENT':
return{count: state.count+1};case'DECREMENT':
return{count: state.count-1};default:
returnstate;}});vartarget=document.querySelector('app');varhandlers={};functionrender(){console.log(store.getState())components['app-title'](target,store.getState(),handlers);}// add event handlers using Mageryhandlers.increment=function(){store.dispatch({type: 'INCREMENT'});};handlers.decrement=function(){store.dispatch({type: 'DECREMENT'});};// update the page when the store changesstore.subscribe(render);// initial renderrender();</script></body></html>
I've noticed that in the produced dom, the tree rendered by outside ouf the target
This appears to happen when the tag names are mismatched. So when the target does not match the template tag being rendered onto it. I'm not sure what the appropriate action is in this case, but it should not render a new adjacent tree... perhaps it should just produce an error.
Le 8 janv. 2018 à 16:38, Caolan McMahon ***@***.***> a écrit :
This appears to happen when the tag names are mismatched. So when the target does not match the template tag being rendered onto it. I'm not sure what the appropriate action is in this case, but it should not render a new adjacent tree... perhaps it should just produce an error.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
Here is an exemple
I've noticed that in the produced dom, the tree rendered by outside ouf the target
The text was updated successfully, but these errors were encountered: