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
let render = ({props, path, context, dispatch}) => {
let {todo, destroy, change, state, completed} = props;
let {editing} = context.state[path] || {};
let onEdit = () => {
//the path from first rendering is diffrent from second rendering.
console.log(path);
dispatch({type: 'state changed', path, data: {editing: !editing}});
};
return (
<li onClick={onEdit} class={classname({completed, editing})}>
<div class="view">
<input class="toggle" type="checkbox" />
<label>{todo.value}</label>
<button class="destroy" onClick={destroy}></button>
</div>
<input class="edit" value={todo.value} onKeyUp={change} />
</li>
)
}
The text was updated successfully, but these errors were encountered:
JJVvV
changed the title
Why the first path and second path from render function unequal ?
the first path and second path from render function unequal
Aug 1, 2016
JJVvV
changed the title
the first path and second path from render function unequal
The first path and second path from render function unequal
Aug 1, 2016
@JJVvV I'm still having this issue and I've always been on 2.0-rc16. It's particularly an issue when I am rendering ta reusable component onto the page for a particular container that might appear multiple times. The path being unique per component instance is crucial to managing state of it, especially in combination with deku-stateful.
The text was updated successfully, but these errors were encountered: