Working with JSX involves:
- displaying info from variables - strings, objects
- using Javascript expressions inside JSX
- converting HTML to JSX
- knowing the JSX rules - e.g. only one root element etc.
Where do you think you stand? Check your knowledge by fixing these failing unit tests!
- Run
npm install
- Open the test file:
src/__tests__/jsx-exercises.test.jsx
- Run the tests
npm run test
- Fix them!
Tips:
- replace
test("bla")
withtest.only("bla")
to run only that test - move the console section with the test results to the right side of the code editor, so it's side by side with the code
- for an even better test experience in VSCode, install the Jest extension