Git Product home page Git Product logo

Comments (6)

gnarf avatar gnarf commented on June 2, 2024 1

I noticed that preact-i18n doesn't have display names for it's components either... so added synacor/preact-i18n#4

from preact-render-spy.

gnarf avatar gnarf commented on June 2, 2024 1

That text nodes fix is published in 1.0.0-rc.8

from preact-render-spy.

gnarf avatar gnarf commented on June 2, 2024

Hrm... Can you maybe setup a reduced test case repo for me to start debugging from here? I'll have some time to dig in deeper later today, but it would be nice to not have to set up this scenario myself 😄

I have some thoughts about why... does preact-i18n use context/providers?

Also, was this with render spy's shallow or deep? I bet you it looks more like what you want on shallow

Can you try with import toString from 'preact-render-to-string/jsx' and toString(jsx, { shallow: true }) (we use the shallow option from render-to-string on our toString output)

from preact-render-spy.

gnarf avatar gnarf commented on June 2, 2024

aha, I found the specific issue! basically i assumed any truthy output from components was vnodes, but it can also be a string - which was then made into an invalid vnode

from preact-render-spy.

ingro avatar ingro commented on June 2, 2024

Sorry didn't had time to create a test repo! Glad you already found the problem :), thanks for the fast fix!

from preact-render-spy.

gnarf avatar gnarf commented on June 2, 2024

Also, just as a suggestion - you might want to just start using shallow as your default for testing (unless you're really depending on children components to do something) .

Let me know for sure that this patch fixed your string node issue tho :) (I'm pretty confident it did)

from preact-render-spy.

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.