This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Recipe, Grocery } from "./model"; | |
import { createStandardAction, createAsyncAction } from 'typesafe-actions'; | |
const ADD_RECIPE = '[RECIPE] Add'; | |
const UPDATE_RECIPE = '[Recipe] Update'; | |
const SET_ACTIVE_RECIPE = '[RECIPE] Set Active Recipe'; | |
const UNSET_ACTIVE_RECIPE = '[Recipe] Unset Active Recipe'; | |
const FETCH_RECIPE_REQUEST = '[Recipe] Fetch Recipe Request'; | |
const FETCH_RECIPE_SUCCESS = '[Recipe] Fetch Recipe Sucess'; | |
const FETCH_RECIPE_FAILURE = '[Recipe] Fetch Recipe Failure'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function App({ name }) { | |
// stateHook that keepts track of the count with initial count = 0 | |
const [count, setCount] = useState(0); | |
// get the latest count (not the count scoped inside this function) | |
const latestCount = useRef(count); | |
// is called for every render and sees the variable states for this particular render |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
require 'json' | |
while (true) | |
uri = URI('http://www.outbackbowl.com/') | |
response = Net::HTTP.get_response(uri) # => String | |
headers = response.to_hash | |
cookie_line = headers["set-cookie"].first | |
cookie = cookie_line.split(';').first |