Skip to content
Discussion options

You must be logged in to vote

It looks like param is for positional arguments and option is for keyword arguments. So you would either need to use option instead of param here, or initialize the component with a positional argument Nav.call("Hello").

If you're using Dry Initializer, I recommend patching both the param and option methods to have reader: false by default. Readers are likely to conflict with HTML methods (title is a popular one you've actually run into in this example).

Internally, you can use instance variables instead of accessor methods (I think this is best practice anyway), and there’s usually no need to reference component attributes externally. I believe you can patch the methods like this.

class B…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@me-kirill
Comment options

Answer selected by me-kirill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants