Providing pre-built components #172
                
     Closed
            
            
          
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
I have seen by looking in the repository history that the library used to provide pre-built components for the most common Bootstrap navigation component (routing tied control). I understand that at the time React Router did not allow to have a wrapper like
LinkContainer, thus requiring parallel maintenance on individual components.Providing pre-built components seems like a good idea as it perfectly matches with the existing paradigm of React Router
Link. I assume that they were previously removed from the library because of the maintenance complexity but maybe I am wrong. Given that we now have a stable and more abstract implementation in the form ofLinkContainer, it is now possible to implement those pre-built components in the form of thin wrappers. I added implementation forButtonLink,NavItemLink,MenuItemLinkandListGroupItemLink. Their implementation is very boilerplate and parallel, thus maintenance on those would be in fact minimal as the abstraction now lies onLinkContainer.For example here is what
ButtonLinkimplementation looks like:Also I must mention that those are still allowing the
IndexLinkbehavior by passing theonlyActiveOnIndexas a property.