Skip to content

Preview Component with Dry/Required args #23

Answered by palkan
danielnc asked this question in Q&A
Discussion options

You must be logged in to vote

It seems that there is some problem with render_component method.

I believe, the exception is raised when we try to build a default component instance here:

locals[:component] = name.sub(/Preview$/, "Component").safe_constantize&.new

The question is where do we lost the component passed to the render_with_template method along the way? Only debugging could help here 🤷‍♂️.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@danielnc
Comment options

Answer selected by danielnc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants