Git Product home page Git Product logo

Comments (3)

salcode avatar salcode commented on May 9, 2024

Thinking about this, if we have the following options now that the author object returned by WP GraphQL has changed

Option 1: Pass contents of node

<Avatar author={author.node} />

function Avatar({author}) {
  return author.avatar.url;
}

Option 2: Pass object that contains node

<Avatar author={author} />

function Avatar({author}) {
  return author.node.avatar.url;
}

I think Option 2: Pass object that contains node is the better choice (though Option 1: Pass contents of node is the approach I was trying to take yesterday but in retrospect I think it was the wrong move)

from nextjs-wordpress-starter.

gregrickaby avatar gregrickaby commented on May 9, 2024

@salcode I'm good w/ Option 2

from nextjs-wordpress-starter.

salcode avatar salcode commented on May 9, 2024

@dcooney I know you have essentially this same fix in commit abc5ca9 in the feature/menus branch. Unless we're ready to merge that branch into main (which I don't think we are yet). I'd like to fix this here in main and then we can merge these changes in the feature/menus branch.

from nextjs-wordpress-starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.