Using the provided Expo application in /native
:
- Fetch post data from the provided Express API.
- Display a list of posts. Include the post title, summary, author, and publish date in the list.
- The list of posts should be displayed in reverse chronological order.
- Also list each unique author. Make touching an author filter the list of posts by the selected author.
- Make each post in the list touchable. When you touch a post, navigate to a new screen showing the formatted post body and title.
- Include a way to return to the main screen with posts and authors.
- Include some platform-specific variation between iOS and Android on either the main screen or the post screen.
- Implement basic snapshot regression tests tests using Jest for your
components. Jest is installed in the Expo project and can be run from the
native/
folder withyarn test
.
The post body is formatted as Markdown and the post screen should use the formatted Markdown.
Using the sample application in /review
:
- Run the Expo application.
- Review the React Native code.
- Make suggestions on how the example application could be improved. For this
exercise your suggestions may apply to an entire application, file, or
lines of code. If appropriate, please prefix your suggestions with
filename:line
so we know to what code you are referring.
You can use any stable version of Node JS. The base project is written using TypeScript but you may use vanilla JavaScript to complete the tasks.
yarn prettier-write
Yarn or NPM tools for dependency management.
For this exercise a pre-built Express application is provided. The application
runs by default on localhost:4000
and has the following endpoints:
http://localhost:4000/posts
- returns a JSON-encoded array of blog posts.
cd api/
yarn install
yarn start
You can verify the API is working by visiting http://localhost:4000/posts in your browser or another HTTP client.
The React Native frontend is a bare Expo application. You will need the Expo tools installed to work on the app. See https://docs.expo.io/ for instructions on how to install the Expo CLI tools.
cd native/
yarn install
yarn start
This will start the web console where you may launch the application on iOS, Android, or Web.