Rationale for keeping the name rehype-components:
- the module replaces custom elements using render functions that accept props and children as arguments and produce a HTML tree as output, which is consistent with the definition of a component in React and similar frameworks.
Rationale for moving away from the name rehype-components
- The rendering is static and doesn't have anything to do with React components which re-render dynamically.
- The module has nothing to do with Web Components either.
- The module just replaces a HTML element with a new HTML tree, so it's closer to the idea of a search-replace than to the idea of an encapsulated component.
Rationale for rename to rehype-custom-elements
- The nature of these elements in the HTML is that of custom elements, not of components as they exist in e.g. React JSX expressions.
- Also unlike React components, these custom elements are not distinguished by a capitalized name, but can instead be distinguished from other elements with a hyphen inside the tag name
Rationale against renaming to rehype-custom-elements
- The module doesn't have anything to do with DOM-implemented custom elements, nor with the CustomElementRegistry
Rationale for keeping the name
rehype-components:Rationale for moving away from the name
rehype-componentsRationale for rename to
rehype-custom-elementsRationale against renaming to
rehype-custom-elements