Answer the question
In order to leave comments, you need to log in
Can you rate the ReactJS + Redux test project?
Completed a test task for an internship in one company. They replied that they would not check my test (there are some reasons). Therefore, I turn to the experienced, they could evaluate the project. At least take a quick look, please, so that I understand how much shit I code)
Repository on GitHub
Answer the question
In order to leave comments, you need to log in
1. There is no ifint or prettier.
2. No tests.
3. All commits without names.
4. Almost all comments are in Russian. And most of them describe banal things.
state[0] = state[index] // запись нового выбора на первое место
state.splice(index, 1) // удаление нового выбора с предыдущей позиции в массиве
for (let i = 1; i < state.length; i++) { // сортировка от меньшего к большему по первому числу для возврата предыдущего выбора на правильную позицию
if (state[i].split(' ')[0] > beforeSelected.split(' ')[0]) {
state.splice(i, 0, beforeSelected) // запись предыдущего выбора на правильную позицию
break
} else if (state[i].split(' ')[0] === beforeSelected.split(' ')[0]) { // если первые числа равны проверка по второму числу
if (state[i].split(' ')[2] >= beforeSelected.split(' ')[2]) {
state.splice(i, 0, beforeSelected) // запись предыдущего выбора на правильную позицию
break
}
}
if (i === state.length - 1) { // если предыдущий выбор оказалася наибольшим
state.push(beforeSelected)
break
}
}
const resize = ({ param }) => { // изменение select
...
}
const resize = (obj) => { // изменение select
const param = obj.param;
...
}
I didn’t get into the editor, looking at the code in the react, everything seems to be fine, the only thing that caught my eye in the inline style is that you don’t need to write pixels, just the number is transferred there. Of course, it was also possible to better break the components folder. Let's leave the App at the root, create the pages folder in it, create the page, and leave the components in the components, but this is so nit-picking
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question