A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$
if your browser aliases it:
~ 108 byte version
Method | Side effects1 | State updates2 | Example uses |
---|---|---|---|
Mounting | |||
componentWillMount |
✓ | Constructor equivalent for createClass |
|
render |
Create and return element(s) | ||
componentDidMount |
✓ | ✓ | DOM manipulations, network requests, etc. |
Updating | |||
componentWillReceiveProps |
✓ | Update state based on changed props |
{"id":"1.18.2-arm64","assets":"1.18","javaVersion":{"component":"java-runtime-beta","majorVersion":17},"time":"2022-04-28T02:59:52Z","downloads":{"clientMappings":{"url":"https:\/\/launcher.mojang.com\/v1\/objects\/a661c6a55a0600bd391bdbbd6827654c05b2109c\/client.txt","size":6716693,"sha1":"a661c6a55a0600bd391bdbbd6827654c05b2109c"},"client":{"url":"https:\/\/launcher.mojang.com\/v1\/objects\/2e9a3e3107cca00d6bc9c97bf7d149cae163ef21\/client.jar","size":20259661,"sha1":"2e9a3e3107cca00d6bc9c97bf7d149cae163ef21"},"server":{"url":"https:\/\/launcher.mojang.com\/v1\/objects\/c8f83c5655308435b3dcf03c06d9fe8740a77469\/server.jar","size":46592587,"sha1":"c8f83c5655308435b3dcf03c06d9fe8740a77469"},"serverMappings":{"url":"https:\/\/launcher.mojang.com\/v1\/objects\/e562f588fea155d96291267465dc3323bfe1551b\/server.txt","size":5212964,"sha1":"e562f588fea155d96291267465dc3323bfe1551b"}},"type":"release","libraries":[{"name":"com.mojang:logging:1.0.0","downloads":{"artifact":{"path":"com\/mojang\/logging\/1.0.0\/logging- |
import { Component } from 'preact'; | |
export default class PureComponent extends Component { | |
shouldComponentUpdate(props, state) { | |
return !(shallowEqual(props, this.props) && shallowEqual(state, this.state)); | |
} | |
} | |
function shallowEqual(a, b) { | |
for (let key in a) if (a[key]!==b[key]) return false; |
/* Material Design Adaptive Breakpoints */ | |
/* | |
Below you'll find CSS media queries based on the breakpoint guidance | |
published by the Material Design team. You can choose to use, customise | |
or remove these breakpoints based on your needs. | |
http://www.google.com/design/spec/layout/adaptive-ui.html#adaptive-ui-breakpoints | |
*/ | |
/* mobile-small */ |