- What is React?
- What are the features of React?
- List some of the major advantages of React.
- What are the limitations of React?
- What is JSX?
- What do you understand by Virtual DOM? Explain its working.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const HallOfFame = (function() { | |
| /** @argument {Array<any>} players */ | |
| const sortPlayers = (players) => { | |
| return players.slice().sort((a, b) => { | |
| if (a.length !== 2 || b.length !== 2) { | |
| console.log('[sortPlayers:except]', a, b); | |
| return -1; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Directive({ | |
| selector: '[openNextField]' | |
| }) | |
| /** | |
| * @example | |
| * <form> | |
| * <ion-list> | |
| * <ion-item> | |
| * <ion-label>Text field</ion-label> | |
| * <ion-input [openNextField]="selectFieldRef"></ion-input> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| asd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "EN": "Afghanist", | |
| "PT": "Afeganist", | |
| "DE": "Afghanist", | |
| "ISO Alpha 3-code": "AFG" | |
| }, | |
| { | |
| "EN": "Alban", | |
| "PT": "Albân", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class DIContainer { | |
| diMap: { | |
| [key: string]: any | |
| } | |
| initialDiMap: { | |
| [key: string]: any; | |
| } | |
| add(_class) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { PI } = Math; | |
| class Toolbar { | |
| constructor(toolbarId) { | |
| const element = document.getElementById(toolbarId); | |
| this.form = element; | |
| this.value = null; | |
| this.setValue(); |
Requirements:
- When form control has one or more validation errors, print respective messages under input
- When form control has invalid state, style its input, label and error message as invalid/danger.
- When form control becomes valid, style its input and label as valid/successfull.
- Each form has submit button. This button should be disabled until the form will have a valid value in it.
- Create Angular CLI project
- Copy
sample-data.tstosrcfolder