Pretend we have an application that allows users to log in and read comic books. Think of it as a mix between netflix and kindle. Users can search for content, add to a reading list, share with friends, etc. The stack is a react client with an Express api server, and your DB of choice. How would you add a search feature to this app?
This file contains 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
const fetchMachine = Machine({ | |
id: 'fetch', | |
initial: 'idle', | |
states: { | |
idle: { | |
on: { FETCH: 'loading' } | |
}, | |
loading: { | |
after: { | |
3000: 'failure.timeout' |
The algorithm should take a set of names and return a set of pairs of names chosen randomly as follows:
- Each person’s name is put in “a hat”.
- Each person randomly draws a name from a hat, and becomes that person’s Secret Santa (they’ll buy an anonymous gift for that person)
- If a person draws their own name, they draw again.
INPUT:
Given one of our video pages https://www.wired.com/video, replace the “MORE” button with infinite scroll, so when a user scrolls down on the page, they get the next 12 most-recent videos. Please share your screen to write notes as we talk through your solution.
- Please describe your implementation assuming this is a Ruby on Rails application.
- Talk through all the parts of the application stack.
- Feel free to focus on the parts of the stack where you’re most comfortable.