Cheat Sheet: Datastructures and Algorithms
By Ira Herman
================
Big O Notation:
By Ira Herman
================
Big O Notation:
By Ira Herman
This code challange prompt is modeled after real-world take-home code challenges/prompts many companies use as part of their technical interview process.
This will help you practice/prepare to build a mini-project off of specs, and give you practice/reinforcement using ReactJS with an API back end.
in terminal, run node
then paste in these lines:
require("dotenv").config();
// Connect to mongodb:
require("./config/database");
// Load up our models:
python3 manage.py runserver
createdb
python3 manage.py makemigrations
How to succeed in class:
Let's all agree to:
Example resource: fruits
In I.N.D.U.C.E.S. route order:
URL | HTTP Verb | Action | Notes |
---|---|---|---|
/fruits/ | GET | index | INDEX when a user types localhost:3000/fruits in browser this route shows a list or index of all fruits |
/fruits/new | GET | new | NEW when a user types localhost:3000/fruits/new in browser this route shows the user a form to create a NEW fruit |
By Ira Herman
Use this workflow when working with teams to take advantage of Pull Requests and keep the master branch clean.
useState
Hooks were introduced in React Version 16.8.
Before hooks, all state needed to be within a Class component. Class components come with a lot of boilerplate, which can feel bulky, especially when dealing with a simpler state. Function components, on the other hand, are generally simpler and easier to read - but, until recently, could not manage their own state: they would receive some props, and return some JSX based on those props.
Hooks introduce state management to Function components, using a simpler and more flexible API. Here's an example of a Class component refactored to be a Function component with hooks: