Kitware / react-vtk-js

Declarative library exposing vtk.js visualization pipeline as React components
https://kitware.github.io/react-vtk-js/
77 stars 24 forks source link

🔧 MA-34 Fix Reader TSX #137

Closed cornking2020 closed 4 months ago

cornking2020 commented 5 months ago

What

Why

Screenshot 2024-06-19 at 13 39 46

When you use Reader.tsx in a tsx file, it might throw an error.

How

Don't worry, it's an easy fix!

Just add a return statement to Reader.tsx, and return an empty HTML tag, like this: <></>

That should do the trick! Let me know if you need anything else.

How to Test

Just use Reader in a TSX file and you won't have any errors.

Like this:

<VolumeRepresentation>
    <VolumeController />
    <Reader vtkClass={vtkXMLImageDataReader} url={url} />
</VolumeRepresentation>

Additional Remarks

No.

Just give us a shout if you got any questions, no worries.

jourdain commented 2 months ago

:tada: This PR is included in version 2.0.0-beta.18 :tada:

The release is available on:

Your semantic-release bot :package::rocket: