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

Ports - Elle #25

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

Ports - Elle #25

wants to merge 18 commits into from

Conversation

dev-elle-up
Copy link

Inspiration Board

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What is the flow of data from input on the form to being a new card on the board? Inputs from the form are stored in state in the NewCardForm component. When the submit button is clicked, the event handler calls handleSubmit(), which calls the callback function passed in from the Board component. An object containing the text and emoji from state is passed as a parameter to addCardCallback(). This gets the data to the Board component, in the addCard function. Here the data object is added to the cards array in Board's state using .push and setState. (The data is also passed to an API post request so that it can be saved in the database.)
What function did you use to make the GET request from the API to get the list of cards? Why use that function? I put the GET request inside of componentDidMount() so that the request would be made after the component was mounted.
How do snapshot tests differ from unit tests? Snapshot tests work on the premise that your app is correct at the point in time of the snapshot. They make note of the things that should not be changed. They are the source of truth and you update the tests to match the code. Unit tests are put in place as the source of truth for how the app is supposed to work and you must update your code to pass the tests.
What purpose does Enzyme serve in testing a React app? It enables the tests to make assertions on React components.

…compnoent to render a list of cards from hard-coded data. Currently it will not display results that are missing fieldsbecause those are considered undefined. Need to fix this.
…s and manually tested. App is working as expected.
…hen Board is mounted. Set state of cards to the get request result. Caught errors are lifted to App via a callback function for display in the header.
…equest response. Discovered error messages were not set up properly; fixed that as far as I can tell.
… to each card. Not yet functional. Updated PropTypes.
… to each card. Not yet functional. Updated PropTypes.
…from the database. Connected this to the button's onClick event handler. Need to make the view update.
…he view. Also cleaned up some code and comments. NOTE Right now the API call is commented out for deletions. This is to preserve data for ther rest of the app development. UNCOMMENT BEFORE DEPOLYMENT OR PROJECT SUBMISSION
…added to the database. Need to implement the update to the view. Do this with setState.
… with keys allCards. Making this branch to try a fix. Move rendering of cards to the render function in board. Save all responses from the API directly to the cards array in state.
…tial get request to pull the text and emoji data out of the card object. Now need to go through and fix delete and whatever else broke in the process.
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.

1 participant