Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

This repository contains frontend development solutions for HackerRank challenges. It includes React components, UI logic, and supporting files to solve and demonstrate various coding problems.

Notifications You must be signed in to change notification settings

anon381/frontend-development-Hackerrank-solution

Repository files navigation

Text Append

Environment

  • React Version: 18.2.0
  • Node Version: v18 (LTS)
  • Default Port: 8000

Application Demo:

Functionality Requirements

There is a reusable component in the module named TextField:

  • It renders a <label> and an <input> elements.
  • It receives 2 props -
    • labelText - The text to be rendered in <label> element.
    • onChange - The event handler onChange function to be called on <input> element change.

The module must have the following functionalities:

  • It render 2 TextField components. The first TextField component is used to enter first text. The second TextField component is used to enter second text.
  • As and when values are entered in the text fields, append both texts separated by space and render inside <label data-testid="final-text">.

Testing Requirements

The following data-testid attributes are required in the component for the tests to pass:

  • The final appended text label: final-text
  • The div containing first TextField component: first-text
  • Inside the TextField component:
    • label element: label
    • input element: input

Project Specifications

Read Only Files

  • src/App.test.js

Commands

  • run:
npm start
  • install:
npm install
  • test:
npm test

About

This repository contains frontend development solutions for HackerRank challenges. It includes React components, UI logic, and supporting files to solve and demonstrate various coding problems.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /