A non-trivial (yet simple) front-end programming challenge.
A non-trivial (yet simple) front-end programming challenge. Featuring solutions in React, Redux, Redux-Saga, Cycle.js, Motorcycle.js and Snabbdom.
Check out the Elm solution here!
Create an app with a dynamic and search-able list of data that keeps a search input text query in sync with the URL via a query parameter at all times. Assume the data will be fetched from some API and the API will perform the actual search. The query should be a simple string and kept in sync with the URL via a query parameter 'q' (ex. localhost:3000/?q=batman).
This problem is harder than it first appears, actions must be managed in the correct order, and if not can result in infinite loops and other undesirable behavior.
Solutions are in their own subdirectories above. Check out the README files in each of the subdirectories for example specific details.
Many have similar structures (identical store state + hitting the same mock API). The difference being when and where the apps read router state and when and where the apps dispatch actions.
First clone the repo.
git clone https://github.com/DerekCuevas/friend-list.git
Then cd into an example, 'npm install' and 'npm start' to get going.
cd friend-list/imperative-solution/ # or the others
npm install
npm start
Please make an issue or send in a pull request.