question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Recommended way to implement Component#render with ChuildrenBuilder API

See original GitHub issue

In kotlin-react-legacy there is a good component RComponent that has an abstract method RBuilder.render() which allows an easy and convenient way to render a view. While migrating to the new ChildrenBuilder API, we found out that a lot of methods of new API have internal scope and don’t have any similar wrappers.

Is there any implementation of Component#render() that would allow to render a view with ChildrenBuilder?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

3reactions
sgrishchenkocommented, Jul 13, 2022

Is it planned to implement sort of CComponent

Ok, we will try to be super honest in this discussion, support of Class Components is big head ache and there is quite low profits from it, some modern UI frameworks may not support Class Components at all (see SolidJS). So we suppose that you will have 2 or 3 Class Component in you application (for error boundaries or some exotic scenario), so we don’t see much sense in adding syntax sugar for Class Components

2reactions
akuleshov7commented, Nov 9, 2022

It’s planned to remove ChildrenBuilder at all 😃

Need more insights )

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding Children to Custom Components - Builder.io
To add children to your React custom component, use the withChildren() method. · To allow only certain types of children, you can configure...
Read more >
Write API-based Contentful components using Render Props
Conveniently implementing reusable API calls is now easier than ever before. Read this article about Contentful components and find out how ...
Read more >
How to Render a Component Dynamically Based on a JSON ...
To render the components based on the component key in the JSON config, we first need to create an object that maps the...
Read more >
React children composition patterns with TypeScript - Medium
In this article we will cover various patterns how to leverage children composition with TypeScript to get excellent developer experience and ...
Read more >
Using React Portals to Render Children Outside the DOM ...
Step 1: Create the Portal element · Step 2: Create a Portal component · Step 3: Using the Portal.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found