Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

Feature Request: Named JSX components

$
0
0

The problem is stated in the docs as well:

Handwritten Components

You don’t need to use the @react.component decorator to write components that can be used in JSX. Instead you can write the make function with type props and these will always work as React components. But then you will have the issue with the component name being “make” in the React dev tools.
Components and Props | React

As you can see in your playground example, the first component will be named “make”, the second “Playground$WithDecorator”.

image


While debugging a bundled spa, I see a lot of make functions. make1, make2, …, make35.

Fortunately there is a comment with the file name above the component declaration:
image

But where the component is referenced - only the makeN function
image


Viewing all articles
Browse latest Browse all 2592

Trending Articles