NodeJS on the Frontend
What if you could import a generic NodeJS function into your frontend code? I'll show you how I made it possible.

What if we could import a generic NodeJS function into our frontend code? In this example, statuses
returns results from Firestore.
import { statuses } from './statuses.server.js'
export const Statuses = () => {
if(loading) return <div>Loading...</div>
return (
<div
onClick={() => {
let statuses = await statuses('timeli…
Keep reading with a 7-day free trial
Subscribe to zach.codes to keep reading this post and get 7 days of free access to the full post archives.