Detecting Clicks Outside of a Component in React
Learn how to detect clicks made outside of a component in React. Useful for closing modals and dropdown menus when clicking anywhere else on the page.
Explore posts by category
Learn how to detect clicks made outside of a component in React. Useful for closing modals and dropdown menus when clicking anywhere else on the page.
Learn how you can apply styles from selectors with multiple classes in CSS modules.
Learn how to create your own button component in React. Make it accept all standard HTML button attributes.
Learn how to use Socket.IO with hooks in React. Write a custom hook that handles events.
How do you wrap one component in another in React? Read and learn about composition and creating wrapper components.
This is a quick how-to guide if you want to learn how to pass data from a child to a parent component in React.
A guide to navigating from one page to another in React. Learn how to use React Router to navigate between internal pages in single page applications. Or, just use plain JavaScript.
A React guide to opening external links in either the same or a new tab. Create a component to show an icon next to external links. And finally, learn how to open links using JavaScript code in React.
Learn how to conditionally render React components by embedding expressions in JSX.