improving component inheritance #463
                  
                    
                      amitu
                    
                  
                
                  started this conversation in
                Ideas & RFCs
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If we want to patch some existing component we have to copy over all its arguments.
If the original component was further updated to add another argument, our patched component will have to be updated. This is tedious and error prone.
Imagine if we can write this:
Notice how we instead of defining arguments we used
inherit: doc-site.page. This copies over all the arguments from the inherited component. We can define more arguments if we want. And we can define default values for existing arguments as well. We can even change the type of argument if we wanted.Notice then how we used
-- inherited:. This will pass all the arguments we have that can be passed to inherited component. If we have defined extra argument and we want to pass them to original component we can do that as well.Beta Was this translation helpful? Give feedback.
All reactions