Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
You need to import react in both solution and test case code views.
Don't think Jest is available in codewars.
See the package.json for available testing frameworks: https://github.com/codewars/codewars-runner-cli/blob/master/package.json
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Hey, thanks for your feedback.
I'm not sure I fully understand what part you're saying is not good practice. Could you clarify with an example please?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Now fixed.
I think you have solved the kata correctly, even using
withProps
from recompose.The only thing here is you have not learned to build your own HOC as recompose does that for you.
The point of this kata is to help with getting started building your own HOC.
That is good feedback, perhaps have a couple tests for the fake models to see if
withPriceModel
can handle different price increases.Fixed this. Added in tests to give better feedback for initial test run.
I've updated the assert descriptions, let me know if that helps you.
Otherwise it might be best to show some code and I will try help.
I've added in random generated values for some props expected to be passed through.
What I will do is put descriptions in the assert of what is expected and this might help.
Added a test to check
EasterEgg
returns a li element and has the name inside.I've just created an easier version of ReactJS HOC kata
Try it out: PC upgrade specs using HOC in ReactJS
Hope it helps.
I noticed in the start solution file the
onClick
handlers are set on the button.I was thinking they should be removed and let the trainee implement them on the button so they can try themselves. I think this will provide better learning.
Also explaining more about ReactJS event handles in the description with an example to help the trainee.
The React docs has good examples about events https://reactjs.org/docs/handling-events.html
Loading more items...