3 ms·
Why not just have a function that makes a db call and then send the data into the template? If a mobile app needs to request the same data, simply make a .json
by bmeski 5y ago
Why not just have a function that makes a db call and then send the data into the template?
If a mobile app needs to request the same data, simply make a .json version of the route and use that same little db access function, shove the return into res.json({}) and Tada.
Sharing ui code between react native and web-react is pointless so you'd be sharing what? some formatting functions? the request functions that the .json and ssr routes effectively return for you?