- Briefly introduce yourself and your role.
- Provide an overview of the company and the team.
- Explain the structure of the interview.
# Switch to the "master" branch:
$ git checkout master
# Rename it to "main":
$ git branch -m master main
# Get the latest commits (and branches!) from the remote:
$ git fetch
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
| import React, { useReducer } from "react"; | |
| export default (reducer, actions, initialState) => { | |
| const Context = React.createContext(null); | |
| // Context.displayName = "ContextName"; | |
| const Provider = ({ children }) => { | |
| const [state, dispatch] = useReducer(reducer, initialState); | |
| const boundActions = {}; | |
| for (let key in actions) { |
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 reorder = (list, startIndex, endIndex) => { | |
| const result = [...list]; | |
| const [removed] = result.splice(startIndex, 1); | |
| result.splice(endIndex, 0, removed); | |
| return result; | |
| }; |
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 arrayToObj = components.reduce((acc, cur) => { | |
| acc[cur.id] = cur; | |
| return acc; | |
| }, {}); |
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
| import { Directive } from '@angular/core'; | |
| import { Validator, AbstractControl, NG_VALIDATORS } from '@angular/forms'; | |
| @Directive({ | |
| selector: '[afmValidate]', | |
| providers: [ | |
| { | |
| provide: NG_VALIDATORS, | |
| useExisting: AfmValidateDirective, | |
| multi: true, |
export const setStorage = (key, value, expires) => {
if (expires === undefined || expires === null) {
expires = 24 * 60 * 60; // default: seconds for 1 day
}
const now = Date.now(); //millisecs since epoch time, lets deal only with integer
const schedule = now + expires * 1000;01 Define the shape of your state
export interface YourState {
array: Array[];
string: string | null;
}02 Define the initial state