Node.js Loader

Loading "Node.js Loader"
πŸ‘¨β€πŸ’Ό Alright, we're going to get our server ready to start handling 'use client' modules because we want to add some client-side interactivity to our app.
We're planning on adding the ability to change the ship names by clicking on them. The idea is, the ship name is a button and when you click on it, it'll change to a form with an input which you can then submit and that will update the name. We'll get to the actual implementation for updating later, but for now we just need to get our client-side code for the edit state working.
πŸ§β€β™‚οΈ I've created which you'll need to register with Node.js as a loader for turning 'use client' module exports into reference registrations.
πŸ‘¨β€πŸ’Ό Thanks Kellie. So now, what you need to do is register the loader, update the dev script in to import the loader registration.
node --import ./server/register-rsc-loader.js --conditions=react-server --watch server/app.js
Now update the to add 'use client' to the top of the module.
When you're finished, we'll not actually be loading modules yet, but we'll be almost ready to do it! I recommend you add a couple console logs so you can observe what the loader does to our 'use client' module exports.
πŸ’° I've put a couple good ones in place for you.
Login to get access to the exclusive discord channel.
  • General
    Failed to fetch dynamically imported module...
    FacuPerezM:
    I am getting this error out of nowhere, in the 'test' tab inside the Workshop app. ``` Failed to f...
    1 Β· 11 hours ago
  • General
    Runninng Learning app on iPad?
    marcus_polonus πŸš€:
    Hi all, Did anyone managed to setup learning app on iPad? I tried to use codesandbox, but when I am...
    0 Β· a day ago
  • General
    Clicking an exercise file launch VIM instead of VS Code
    DBattou πŸš€:
    I started going through the workshops, everything is setup and working fine except for opening a fil...
    • βœ…1
    2 Β· 5 days ago
  • General
    Epicshop not saving the video resolution
    Toni πŸš€:
    Playback speed and caption settings are saved, but the video resolution always defaults to auto. Is ...
    • βœ…1
    7 Β· 2 days ago
  • General
    Launch editor error: spawn code ENOENT
    Andrew Elans 🌌 πŸš€:
    Clicking index.html gives this error in VS Code. Both from Chrome and Safari. Anyone?
    • βœ…2
    3 Β· a day ago
  • General
    Welcome to EpicReact.dev! Say Hello πŸ‘‹
    Kent C. Dodds β—† πŸš€πŸ†πŸŒŒ:
    Welcome to the first of many posts in the EpicReact.dev channel! Take a moment to introduce yourself...
    • πŸš€5
    34 Β· 17 hours ago