arkency/reactjs_koans

06 - RenderComponent test fails

AdrianNowik opened this issue · 1 comments

I have problem with 06 task, i think i made some kind of workaround, or there is something wrong with test for this task. Here is my code of renderName function:

function renderName(domNode) {
  React.render(React.createElement(Name), document.getElementById('tab-content8'))
}

And there is error generated by test:

  1. 06 - RenderComponent "before each" hook:
    Error: Invariant Violation: _registerComponent(...): Target container is not a DOM element.
    at renderName (src/es6/06-RenderComponent.js:18:7)
    at Context. (test/es6/06-RenderComponent.js:6:5)

Hey,

You should have used domNode argument instead of document.getElementById('tab-content8'). :)