
dangerouslySetInnerHTMLĭangerouslySetInnerHTML is React’s replacement for using innerHTML in the browser DOM. If you use React with Web Components (which is uncommon), use the class attribute instead. This applies to all regular DOM and SVG elements like, , and others. To specify a CSS class, use the className attribute. defaultChecked is the uncontrolled equivalent, which sets whether the component is checked when it is first mounted. This is useful for building controlled components. You can use it to set whether the component is checked. The checked attribute is supported by components of type checkbox or radio. There are a number of attributes that work differently between React and HTML: checked

For example, you can keep aria-label as aria-label. The exception is aria-* and data-* attributes, which should be lowercased.

For example, the HTML attribute tabindex corresponds to the attribute tabIndex in React. In React, all DOM properties and attributes (including event handlers) should be camelCased. We took the opportunity to clean up a few rough edges in browser DOM implementations. React implements a browser-independent DOM system for performance and cross-browser compatibility. These new documentation pages teach modern React and include live examples: That will also be useful for some designs.These docs are old and won’t be updated.

I think I'll work on one that ties stroke width to distance from the camera. Then parent the shape layer to any null and the stroke will remain the same relative size no matter what the scale of the parent layer is. It's something that I will use once in a while.Īll you have to do is type Stroke in the timeline search field to reveal all stroke width properties in all shape layers, drag a selection around all of them and then apply the animation preset. The expression is so good that I'm saving it as an animation preset. It will take about 2 seconds and you could have a couple hundred stroked layers tied to the scale of their parent layer and show no errors if there was no parent. When you get the expression working for one stroke you can copy expression only, type Stroke in the timeline search to show all stroke properties on the layer and then select them all and paste. The second if statement prevents divide by zero errors and retains the original stroke value if the scale gets to zero. The Stroke value is now modified by the X layer scale no matter what the parent layer is. f there is no parent the original stroke value is retained. The first if statement keeps the original stroke value is there is no parent. The layer name if the parent no longer a potential problem, the expression is just looking for a layer with a parent. Here is the expression I would use for Stroke: The expression makes no allowance for divide by zero errors. The explanation is incomplete and the workflow is inefficient.
