Skip to content

Conversation

@hgray-instawork
Copy link
Collaborator

@hgray-instawork hgray-instawork commented May 29, 2025

Replaces uses of renderElement and renderChildren with the hv-element and hv-children components.

Awaiting release of Hyperview with the two components.

Asana

Improving performance by creating a new `hv-element` component as a
replacement for Render.renderElement. This allows memoizing the options
and props of the component to reduce unneeded re-renders.


[Asana](https://app.asana.com/1/47184964732898/project/1204008699308084/task/1210344460236268?focus=true)
Consolidate the logic between `src/services/render` and the new
`hv-element` component.
- Created a new utility to abstract the `null` render logic and logging
- Update render service to use logic and then return the component
- Update `hv-element` to use utility for logic and logging
- Export `hv-element` for access outside Hyperview
- Confirmed external use of `Hyperview.renderElement` with new logic
still working (using existing nav-back demo)
- Update `nav-back` demo to use component instead of function


[Asana](https://app.asana.com/1/47184964732898/project/1204008699308084/task/1210368849843731?focus=true)
Creating a component which can replace the use of the render service
`renderChildren`. Provides a mapping of child nodes to `<HvElement>`
components.

- [Created the new
component](0ece9f6)
- [Switched four element types from ts to
tsx](dd518da)
- Replaced `React.createElement` implementations with declarative
instances [using the new component to render
children](7c73c9b)
- Updated the sticky header logic to use the rendered children and
[added a verification of a valid
`getAttribute`](65d8b20)



[Asana](https://app.asana.com/1/47184964732898/project/1204008699308084/task/1210344460236290?focus=true)

---
- To see the specific tasks where the Asana app for GitHub is being
used, see below:
  - https://app.asana.com/0/0/1210344460236290
Removing changes made to demo until the next HV release.
Base automatically changed from hardin/render-component-integration to master June 6, 2025 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants