#Reuse Remix web app for Mobile App

1 messages · Page 1 of 1 (latest)

autumn pasture
#

I am working on Remix web app and about to finalize it, but the client has requested also to build a mobile app for the same project
Is there any solution other than using resource routes (rewriting all the routes again and return JSON data instead of UI component)
What are the available options to reuse the UI routes or the back end logic to serve mobile API ?

brittle orbit
#

All routes are also API endpoints, accessible with the ?_data=routeId query param. You can see how it's formatted by navigate your page with devtool network tab - Fetch/XHR.

devout terrace
#

I recommend you to don't rely on the _data search param since that's an implementation detail of Remix