React Final Project
Did not know if I would make it this far in the Flatiron Program having no previous coding experience but, final project is completed! This project has taken everything we learned and added some new material like React, Redux, and State. Here is my Github repository for the project.
For this project the frontend was created using React/Redux. The backend was created using Ruby on Rails.
React came with a myriad of new terms and structures. State is a very important new term. State is an object that is changeable while using the app. This changing of state is handled in the reducers of my frontend.
Reducers are functions that determine the change in state based on actions received.
In the above example you can see that state is set to both an empty array of pokemon and allPokemon. Using Switch and case, I can alter state depending on what action is being taken in the app.
Props (properties) is what happens when you pass state to a child component of the component that is handling state.
You can see an example of this happening above in my routes. The component of Pokedex has a variable of pokemon being set to this.props.allPokemon. If everything works as intended I can then call props inside of the Pokedex component as an argument and use props how I need it.
React was interesting to work with and very challenging. It requiring lots of extra trial and error, and pair programming with fellow student to figure out. I know there is still plenty to learn about react but I feel I have a solid foundation now that I have built something using it.