Solving the Duplication Problem with Components

InstructorSam Selikoff

Share this video with your friends

Send Tweet

Reusing our custom server selector will result in lots of duplicate markup. Tailwind doesn't attempt to solve this duplication problem on its own, but instead encourages us to use whatever tools for code reuse we already have at our disposal. Let's make a NavLink React component to make our custom treatment easy to reuse and change.

The code for this lesson is divided into two sections, with this you can see the progress on the code.

  1. Begin
  2. End