This is a solution to the Shortly URL shortening API Challenge challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Note: Delete this note and update the table of contents based on what sections you keep.
Users are able to:
- View the optimal layout for the site depending on their device's screen size
- Shorten any valid URL
- See a list of their shortened links, even after refreshing the browser
- Copy the shortened link to their clipboard in a single click
- Receive an error message when the
form
is submitted if:- The
input
field is empty
- The
- Solution URL: Solution URL
- Live Site URL: Live site URL here
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- Mobile-first workflow
- React - JS library
- Styled Components - For styles
- VsCode - Editor
I learned how to use styled components and how to use the clipboard API.
const copyToClipboard = (e) => {
navigator.clipboard.writeText(e.target.innerText);
};
I want to build my own API rather than using the one provided by Frontend Mentor. I also want add authentication to the app so that users can save their links and access them from any device.
-
Clipboard API - This helped me to copy the shortened link to the clipboard.
-
Styled Components - This is an amazing library that helped me with my styles.
-
React Icons - This helped me to use the icons.
-
React Toastify - This helped me to show the error messages.
-
React Router - This helped me to create the routes.
-
React Helmet - This helped me to change the title of the page.
-
Vite - This helped me to create the project.
-
React Hook Form - This helped me to create the form.
- Website - Abir
- Frontend Mentor - @yourusername
- Twitter - @yourusername
I want to thank Frontend Mentor for this challenge. I learned a lot from this challenge.