Friendly ping in case you missed. I made PR to wra...
# react
n
Friendly ping in case you missed. I made PR to wrappers for React Router: https://github.com/JetBrains/kotlin-wrappers/pull/39
👏 1
☝️ 1
🎉 2
d
what about
redirect
component?
n
I added all components I am using and sure it is working. But I could add redirect as well. Don’t you mind write a comment in the repo? otherwise I could forgot
d
sure. thanks. redirect is pretty useful sometimes
n
Could you explain use cases? And what is different between
window.location = <url>
?
d
not sure (i'm pretty new to react). i guess it is more idiomatic?
btw the new repo for js extensions is here https://github.com/Kotlin/js-externals maybe your PR should be pushed there too?
n
This code contains some DSL. Maybe it should be spitted.
Maybe do you have any suggestions for default props of the Redirect?
d
i have no idea 🙂 after reading router docs i don't even sure anymore if i really need it in my project. the api is extremely cryptic, and simple
if
statement works better for me.
Copy code
if (!state.loggedIn) {
            loginView()
        } else {
            mainView()
        }
n
I suppose from and to are mandatory. Anyway, I will leave it, maybe someone will use it
👍 1