Solicitando primer pull request#27
Conversation
HectorBlisS
left a comment
There was a problem hiding this comment.
Los commits podrían ser un poco más descriptivos, el uso de nombres, variables, id, clases etc en español ya no será tolerable en el siguiente proyecto, muy bien el trabajo en equipo y progresivo, se nota que respaldaron seguido, muy bien.
| <option id="grass">grass</option> | ||
| <option id= "poison">poison</option> | ||
| <option id= "fire">fire</option> | ||
| <option id = "fairy">fairy</option> | ||
| <option id= "water">water</option> | ||
| <option id = "bug">bug</option> | ||
| <option id = "normal">normal</option> | ||
| <option id = "electric">electric</option> | ||
| <option id = "ground">ground</option> | ||
| <option id = "fighting">fighting</option> | ||
| <option id = "psychic">psychic</option> | ||
| <option id = "rock">rock</option> | ||
| <option id = "ice">ice</option> | ||
| <option id = "ghost">ghost</option> | ||
| <option id = "dragon">dragon</option> |
There was a problem hiding this comment.
Esto pudo crearse dinámicamente con la misma data de los pokemons.
| label.className+=("a" +item.id) | ||
| label.id= ("a"+item.type) | ||
| let btn= document.createElement('button'); | ||
| btn.className+= ("btn-Images") |
There was a problem hiding this comment.
className no existe en native, eso es de ReactJS, la forma de trabajar con clases en Vanilla es:
btn.classList.add("btn-Images")
| label.className+=("a" +item.id) | ||
| label.id= ("a"+item.type) | ||
| let btn= document.createElement('button'); | ||
| btn.className+= ("btn-Images") |
There was a problem hiding this comment.
Eviten usar clases con mayusculas o camelCase, btn-images
|
|
||
| let btnImg = document.querySelectorAll('.btn-Images'); | ||
| let Imgs = btnImg.id | ||
| let Imgs = document.querySelector('#a') |
There was a problem hiding this comment.
Eviten las mayusculas en las variables, a menos que se entienda qué es una clase (JS) y porqué se usan Mayusculas en una declaración de clase, bien por el uso de querySelector
| function onChange(e){ | ||
| let value = e.target.value | ||
| let nuevaListaFiltrada = dataPokemon.filter(p=>p.type.includes(value)) | ||
| console.log(nuevaListaFiltrada) |
There was a problem hiding this comment.
Evitar español, y cuidado con la identación de las funciones, lo vuelve difícil de leer
| <a href="#">FUEGO</a> | ||
| <a href="#">FUEGO</a> | ||
| <a href="#">FUEGO</a> | ||
| <a href="#">FUEGO</a> |
| export const dataPokemon= () => { | ||
| //data.pokemon.filter((item) => item.id === Number); | ||
| return data.pokemon; | ||
| }; |
There was a problem hiding this comment.
Función inecesaria no crees?
| let options= document.querySelector(".dropdown-content"); | ||
| options.addEventListener('click',onChange) | ||
| function onChange(e){ | ||
| let value = e.target.value |
There was a problem hiding this comment.
Muy bien el uso del evento.
No description provided.