30 seconds of code provides a curated collection of short code snippets for all your development needs. Our collection spans many topics, ranging from simple coding problems to theoretical concepts and development techniques.
Renders a checkbox list that uses a callback function to pass its selected value/values to the parent component.
Creates a card that shifts on hover.
Groups the given data into
k clusters, using the k-means clustering algorithm.
Create your own static file server with Node.js in just 70 lines of code.
Renders a tabbed menu and view component.
Creates a list with floating headings for each section.
Take a deeper dive into React's rendering process and understand how to make small yet powerful tweaks to optimize performance.
Renders a textarea component with a word limit.
Retrieves a set of properties indicated by the given selectors from an object.
Creates an object containing the parameters of the current URL.
Boolean traps can cause readability and maintainability issues in your code. Learn what they are, how to spot and fix them in this article.