-
If the first button is pressed and the second button is pressed, it does not work. Where did I go wrong? Below is that link.
In the CarNameComponent.js, |
Beta Was this translation helpful? Give feedback.
Answered by
hochan222
Jun 2, 2021
Replies: 1 comment
-
헐.. innerHTML 을 사용하면 자식의 모든 노드는 파괴된다. const render = (JSX: string): void => {
const sectionElement = document.getElementById('app');
if (sectionElement) {
sectionElement.insertAdjacentHTML('beforeend', JSX);
// sectionElement.innerHTML += JSX;
}
return ;
}; insertAdjacentHTML 로 변경! |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
hochan222
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://stackoverflow.com/questions/595808/is-it-possible-to-append-to-innerhtml-without-destroying-descendants-event-list
헐.. innerHTML 을 사용하면 자식의 모든 노드는 파괴된다.
insertAdjacentHTML 로 변경!