Giter VIP home page Giter VIP logo

bug: When i try to integrate with react application, the slot element contains hidden attribute instead of displaying the content. Note: This stencil component is using scoped element. about stencil HOT 8 OPEN

muthupriyashanmugam avatar muthupriyashanmugam commented on June 24, 2024
bug: When i try to integrate with react application, the slot element contains hidden attribute instead of displaying the content. Note: This stencil component is using scoped element.

from stencil.

Comments (8)

tanner-reits avatar tanner-reits commented on June 24, 2024

@muthupriyashanmugam Have you tried using the latest version of Stencil? We've made some changes to slot behavior for scoped components in releases post v4.7.0 (your reported version). For more information, check out this section of the docs on what has been resolved and how to enable these fixes.

from stencil.

muthupriyashanmugam avatar muthupriyashanmugam commented on June 24, 2024

We are using the Stenciljs version ^4.7.0 in the package json. Let me check with the recent version and let you know.

from stencil.

muthupriyashanmugam avatar muthupriyashanmugam commented on June 24, 2024

@tanner-reits I have tried the latest version of stencil v4.18.0 but still it shows the hidden attribute added to the slot element.

Note: we are using the stencil library as a web component and compiling those code as a react component and used as a react npm module in another react application.

When we use the react application, we face this kind of issue.

from stencil.

muthupriyashanmugam avatar muthupriyashanmugam commented on June 24, 2024

@tanner-reits Any update on this issue?

from stencil.

tanner-reits avatar tanner-reits commented on June 24, 2024

@muthupriyashanmugam Can you create a complete reproduction case including the React portions? That way we can be sure to see the same behavior. Also, in your case, are you using the React output target?

from stencil.

ionitron-bot avatar ionitron-bot commented on June 24, 2024

Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.

Please reproduce this issue in an Stencil starter component library and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.

If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.

For a guide on how to create a good reproduction, see our Contributing Guide.

from stencil.

muthupriyashanmugam avatar muthupriyashanmugam commented on June 24, 2024

@tanner-reits Yes, we are using the react output target option to generate the react component. In our case, the slot is adding the hidden attribute rendering when we use it in the react nextjs application.

I have tried to test this case in a sample react application, it's working fine. Then only I come to know that it may be the react nextjs makes an issue.

from stencil.

muthupriyashanmugam avatar muthupriyashanmugam commented on June 24, 2024

@tanner-reits Could you please help me to find out the cause for the issue which i am facing is that if i include my stencil scoped component in a nextjs react application as a node module, it's rendering as a shadow-root component.

from stencil.

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.