Pluggable ESLint configuration for Node.js that extends ESNext with Node.js-specific safety checks and best practices
73
Build a reusable button component that manages internal state and communicates with parent components through callbacks.
Create a custom button component with the following features:
Component Structure
State Management
Visual Feedback
@generates
/**
* A toggle button component that manages active/inactive state
*
* @param {Object} props - Component properties
* @param {string} props.label - The text label to display on the button
* @param {Function} [props.onStateChange] - Optional callback invoked with new state (boolean) when toggled
* @param {string} [props.className] - Optional CSS class name(s) to apply
* @returns {JSX.Element} The rendered button element
*/
export function ToggleButton(props) {
// IMPLEMENTATION HERE
}Provides the component framework and state management.
Install with Tessl CLI
npx tessl i tessl/npm-eslint-config-nodedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10