GithubHelp home page GithubHelp logo

Comments (8)

gerardo-rodriguez avatar gerardo-rodriguez commented on June 12, 2024 1

This one is a bit of a challenge to figure out. 😅

First, I started by commenting out the initCommentReplyForms(), but that didn't seem to do anything.

Next, I moved the useEffect() that calls initCommentReplyForms() into the decorators attribute on the <Meta>, something like:

<Meta
  title="Components/Comment"
  decorators={[
    (story) => {
      useEffect(() => {
        initCommentReplyForms();
      }, []);
      return story();
    },
  ]}
/>

But that didn't seem to do anything.

My next thing to try is simplifying the makeComment() function. I just reduced it to this:

export const makeComment = () => ({
  approved: true,
  comment_content: 'hello world',
});

And this seems to be making a difference! I don't understand why or what in makeComment() might be causing an issue, though. I'll keep digging. 🔍 👀

from cloudfour.com-patterns.

calebeby avatar calebeby commented on June 12, 2024 1

I remember running into this when I was trying to switch to vite. I think I figured out a way to work around this... if I remember right?

Here is the PR if you want to give it a shot and check if it is fixed there: #2012

I'd like to revisit that PR soon

from cloudfour.com-patterns.

gerardo-rodriguez avatar gerardo-rodriguez commented on June 12, 2024 1

@calebeby Sure! I have until about 11:30.

from cloudfour.com-patterns.

calebeby avatar calebeby commented on June 12, 2024

If it is fixed there, I can look into why if you'd like.

from cloudfour.com-patterns.

gerardo-rodriguez avatar gerardo-rodriguez commented on June 12, 2024

Thanks, @calebeby, taking a look now!

from cloudfour.com-patterns.

gerardo-rodriguez avatar gerardo-rodriguez commented on June 12, 2024

@calebeby It does seem like it is fixed there!

If I start here: https://deploy-preview-2012--cloudfour-patterns.netlify.app/?path=/story/components-comment--single

Then switch over to the "Docs" tab, Firefox doesn't freeze up like it's doing now.

from cloudfour.com-patterns.

gerardo-rodriguez avatar gerardo-rodriguez commented on June 12, 2024

This is interesting, the initCommentReplyForms() function is being passed in as the 2nd argument of the template(). 🔍 👀

from cloudfour.com-patterns.

calebeby avatar calebeby commented on June 12, 2024

@gerardo-rodriguez do you have a few minutes to meet and check in about that PR? I can try to explain how that works and where I left it so we can decide what to do

from cloudfour.com-patterns.

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.