Ready to get started?

Join Adocasts Plus for $8/mo, or sign into an existing Adocasts Plus account, to get access to all of our lessons.

robot mascot smiling

Serializing Props as Element Attributes

@tomgobich
Published by
@tomgobich
In This Lesson

We'll learn about EdgeJS' serialize only and serialize except utility methods, which allow us to directly serialize key-value pairs from our props as element attributes within our components.

So now there's one last nugget of information that we should cover about props, and that's a utility that EdgeJS comes with called SerializeExcept and SerializeOnly. These utilities allow us to set and serialize props as direct attributes on elements.

Let's take a closer look at how they work.

Attribute Serialization

Join the Discussion 2 comments

Create a free account to join in on the discussion
  1. 1
    1. Responding to grace-charles
      @tomgobich

      Yeah, I need to add a way to tag these series to specific versions! Though the process is still the same, the syntax for this series is using EdgeJS & AdonisJS 5. If you're curious, you can find the full list of differences between EdgeJS 5 vs 6 here:

      https://edgejs.dev/docs/changelog/upgrading-to-v6

      1