https://kotlinlang.org logo
#javascript
Title
# javascript
r

Rafał Kuźmiński

02/19/2023, 4:33 PM
Hello 😉 I'm trying to implement beautiful drag and drop from Kotlin JS wrappers in my React app. I found that DragDropContext extends "Component" which means I cannot use it in "FC" functional components:
Copy code
val Example = FC<FindRouteProps> { props ->

    child(DragDropContext::class) { // compilation error

    }

}
but I can use it on "fc" components:
Copy code
val Example = fc<FindRouteProps> { props ->

    child(DragDropContext::class) { // works

    }

}
Is there any "hack" so I would be able to use it in FC components? What is the difference between FC and fc? Why some wrappers like react-mui use FC and other fc?
t

turansky

02/19/2023, 6:28 PM
3 Views