Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Luxi Lindsey - inspiration-board - Octos #21

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

Lindseyls
Copy link

Inspiration Board

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Explain the steps in creating a new Card from the form. Once the submit button is clicked from the form, a new Card is created when the text and/or emoji objects are called back into the Board as a state and the AddCard function uses axios post request to create the new card with the object. The object is pushed into the cards array, which is then rendered onto the Card component at props that will now display all the cards.
How did you learn how to use the API? I tested the API in postman first for get, post, and delete before implementing the API with axios. this way I knew what the exact url should be that gets passed into axios.
What function did you use to place the GET request from the API to get the list of cards? Why use that function? The componentDidMount() function is used to place the Get request from the API using axios. The componentDidMount() function is one of the most commonly used lifecycle methods in React. We use this method to load in any external data from an API that we might need.
Explain the purpose of a Snapshot test. The snapshot files that get created during a Snapshot test shows how Jest compares the current snapshot to the rendered content from the test. With snapshot testing we can test how React components render to the DOM. We can also test how the components respond to user interaction.
What purpose does Enzyme serve in testing a React app? The Enzyme's mount function is used to create the snapshot in testing a React app.
Summary This was a fun project! I learned a lot about how to use the API with axios in React. Also, the testing with jest was not too bad. I also got a better understanding of how to use state and props.

Lindseyls added 16 commits June 11, 2018 15:28
… to include axios so the new cards will be posted onto the API successfully.
…which also created a snapshot. Updated the Status.js component with a ternary on the props.type
…ed but I wanted to try it to test it and get more practice.
…ated the emoji list and hide some console.log
@CheezItMan
Copy link

Inspiration Board

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Good number of commits and good commit messages
Comprehension questions Check, enzyme is instead used to shallowly mount to make Jest's snapshot tests smaller and easier to read. It's also used to select elements in a component in testing. This is very useful when testing events.
General
Card Component renders the data provided as props Check
Board Component takes a URL and renders the list of Cards and passes in callback functions Check
NewCardform Component is a controlled form and uses a callback function to return entered data to the parent component Check
API
GET request made in componentDidMount Check
DELETE request made in callback function Check
POST request made in callback function passed to NewCardForm component. Check
Snapshot testing Check
Styling Looks good!
Overall Nice work, you hit all the learning goals!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants