7 kyu

Creating Elements with React

1,000 of 1,002dnolan
Description
Loading description...
React
Fundamentals
  • Please sign in or sign up to leave a comment.
  • Vsairaj Avatar

    If I use a tag directly within the function (even when Ive used it properly) it says SyntaxError: Unexpected token < at createScript (vm.js:80:10)

    I tried to run one of the other successful solutions posted which also had the tag used and got the same response. Any idea why?

  • keithpaul Avatar

    For someone new to React this is extremely vague and confusing. Especially around createElement and how it is meant to be implemented here. Literally NONE of the solutions are even close to this starting code. In order to get this working you need to add to the params of the functions (which if you don't know React you would have 0 clue).

  • willy35 Avatar

    lol.

    What a kata....

    Make the createElement => use React.createElement

  • ffoleyTE Avatar

    This is a poorly worded kata, it should have stated use the React.createElement method.

  • AndroidMinsky Avatar

    I'm having some troubles with the createElement. The 'should be able to take in a properties object' fails. Expected: 'identifier', instead got: null and Expected: 'value', instead got: undefined. Can someone pls help me with that one?

  • VKen Avatar

    I seem to have misunderstood the question and never used React.createElement method. Even though I read "wrapper method", somehow my brain translates it into "reimplement React.createElement"

    I completed the kata using functional-component declaration, different from many of the solutions.

    Perhaps a test case that checks for class-component properties that functional components does not have, will help right my tunnel vision during submission.

  • JohanWiltink Avatar

    Not a JavaScript kata.

  • tuchi35 Avatar

    I'm having issues with one of the server's tests: "should render the list properly". What is the list passed as param in that case? Thanks!

  • robert.cutright Avatar

    I think I will set this one aside for now. I am at work (none coding job) and I want to be able to take my time with this one.

  • user7831952 Avatar

    I kind of wished that the examples would include one that makes use of the "props" argument. Oh well.

  • GiacomoSorbi Avatar

    Not so easy, particularly if you have little background in this stuff (the doc didn't help at all in my case; on the contrary...), but glad I did and learned something new: thanks :)

  • DeanBrown Avatar

    cool I thought we had to use the javascript only version of React but from the other solutions it looks like node automatically interperets JSX with require('react');

  • adam-tokarski Avatar

    Good to see React here, but shouldn't that be separate language from JS? Thanks for that Kata, I see it's time to learn something new!

  • MindWanderer Avatar

    For a framework that many people won't be familiar with, Facebook's documentation is highly technical and skips some basic assumptions. I had to guess several times what syntax it was looking for.

    Kudos to them in that my guesses were right every time, so it's reasonably intuitive, but there should really be some complete examples somewhere.

  • spencerwi Avatar

    UndorderedList -> "UnorderedList"

  • bkaes Avatar

    Missing example test cases.

  • tbassetto Avatar

    I have a solution working in the console (of a browser), but when I click "Run tests" inside codewars all I get is a an helpful "Test didn't pass: Unknown error". Is the server running tests down at the moment?

  • paragonHex Avatar

    This is the best Kata I did encounter nowadays! It finally forced me to look at React, wich I was avoiding for too long I guess. Thank you!