kotlin-wrappers
kotlinx.html
Our great sponsors
kotlin-wrappers | kotlinx.html | |
---|---|---|
16 | 10 | |
1,287 | 1,540 | |
1.2% | 2.6% | |
9.9 | 7.6 | |
1 day ago | 3 days ago | |
Kotlin | Kotlin | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
kotlin-wrappers
-
How can I learn Kotlin web development?
If you want something more standard, I'd look at Kotlin Wrappers and look at examples of using react - https://github.com/JetBrains/kotlin-wrappers
-
Create any kind of app with Kotlin
Kotlin wrappers for JS.
-
[Typesafe HTML DSL] Is there a way to use the "%" unit in CSS?
Looking at the source code, yes there is: use suffix of pct: (-50).pct
Yes! Interesting that it isn't defined in the Length.kt file (that's where I was looking for it) and is instead in its lonesome, but I guess it makes sense as it's not actually a length value. Thanks for the help!
-
React Storybook for Kotlin/JS: Basic set up
plugins { kotlin("js") id("com.github.node-gradle.node") version "3.4.0" } kotlin { js(IR) { // let's rename it to more reusable as under that name we will access it in our boilerplate code moduleName = "stories" // browser also works fine here, we just need it for compiling purposes as of now nodejs {} // add a startup script to our package json compilations["main"].packageJson { customField( "scripts", mapOf("storybook" to "start-storybook -p 6006 -c $projectDir/.storybook --ci") ) } binaries.executable() } } tasks.named("build") { dependsOn("assemble") dependsOn("copyJsStories") } tasks.register("copyJsStories") { dependsOn("developmentExecutableCompileSync") from("$projectDir/src/main/js") into("$buildDir/compileSync/main/developmentExecutable/kotlin") // flatten all files to appear on one level eachFile { if (isDirectory) { exclude() } path = path.replace("/", ".") } } tasks.register("copyPackageJson") { dependsOn("build") from("$buildDir/tmp/publicPackageJson/package.json") into("$projectDir") } tasks.register("start") { dependsOn("build") dependsOn("npmInstall") args.addAll("run", "storybook") } tasks.named("npmInstall") { dependsOn("copyPackageJson") workingDir.set(file("$projectDir")) inputs.file("package.json") } dependencies { // dependency to the project with components implementation(project(":app")) // react dependencies to put on package.json explicitly // can resolve the actual versions on https://github.com/JetBrains/kotlin-wrappers implementation(npm("react", "^17.0.2")) implementation(npm("react-dom", "^17.0.2")) implementation(npm("react-router-dom", "^6.2.2")) // storybook specific dependencies implementation(npm("@storybook/builder-webpack5", "^6.5.9")) implementation(npm("@storybook/manager-webpack5", "^6.5.9")) implementation(npm("@storybook/node-logger", "^6.5.9")) implementation(npm("@storybook/preset-create-react-app", "^4.1.2")) implementation(npm("@storybook/react", "^6.5.9")) }
-
Do you use kotlin/js?
From my experience if you're truly trying to interop with JavaScript code that is already out there on npm, you better hope there is a library that already wraps it like kotlin wrappers. Otherwise you would have to write a wrapper library yourself or use dukat to convert typescript definitions to kotlin (which I have never had the best luck converting but maybe it got better?).
-
[AskJS] I have spent 7 years creating a JavaScript alternative, would love to hear your feedback
It's still pretty finnicky to configure and it hasn't emerged from alpha yet, so its future isn't exactly secure, but I'm hopeful as they appear to be investing a lot of resources into it and adjacent projects, e.g. the kotlin-react library.
-
Kotlin Team AMA #3: Ask Us Anything
We already have a battle-tested integration with react (it's used inside jetbrains.space) -- https://github.com/JetBrains/kotlin-wrappers And, take a look at docs and hands-on.
You can use kotlin-wrappers to write React applications or one of the Kotlin/JS frameworks.
-
KotlinJS and State Hooks
useState part of React Hooks for state management is something that even Javascript and Typescript engineers struggle with from time to time. We are going to reduce this struggle within the React ecosystem using KotlinJS and the ever incredible Kotlin-React library.
kotlinx.html
-
Dart 3 will be on pair with Kotlin and other top languages (you can see more features in the proposal)
As for the strange infix syntax, you're correct - it's not important (for Dart anyway). Kotlin supports writing code that have DSL like syntax making things like typesafe HTML or Jetpack Compose possible.
- I taught the chat bot an alternative syntax for HTML, called HBML, basically just braces instead of tags... we are so screwed
-
Create any kind of app with Kotlin
Html DSL in Kotlin. See it on Github.
- Is there an equivalent for Compose Web for server side Kotlin apps?
-
Show HN: Imba – I have spent 7 years creating a programming language for the web
Thanks for sharing, I really like projects like this. And the website is really informative.
I find it less of a new language and more of a JS preprocessor, removing lots of the cruft and integrating XML-tags and CSS in a very neat way.
What I miss:
1) I feel the web is shifting to more type checking. TS, Elm, Kotlin.js... I personally also prefer more typesafety, especially if the project grows in LOC/team size.
2) Compared to JSX, Imba does a much better job in integrating adjacent technologies. Though I much prefer these to be integrated in an eDSL fashion. For example how Elm does HTML templating (in Elm) or Kotlinx.html[1].
Just taste i guess. Good luck with yr project!
-
Kotlin Team AMA #3: Ask Us Anything
I do use kotlinx.html and while there is a lack of the documentation about the tags, most of them are already implemented (as far as I know they are automatically generated) and the ones that aren't automatically generated can be implemented manually in your own project.
Recently I wanted to try doing Kotlin Fullstack with https://htmx.org/ , I looked at several HTML Template Engines and came across kotlinx.html. I really wanted to use it to make my whole stack type safe, but the few wiki pages that you call "documentation" really had me struggling to use it. https://github.com/Kotlin/kotlinx.html/wiki Like I didn't even find a whole list of all tags you have. I really expected different from a offical Jetbrains Kotlin library, not to mention there is a complete lack of tutorials for this library, I switched to mustache because they have way better documentation.
What are some alternatives?
http4k - The Functional toolkit for Kotlin HTTP applications. http4k provides a simple and uniform way to serve, consume, and test HTTP services.
xmlutil - XML Serialization library for Kotlin
vertx-lang-kotlin - Vert.x for Kotlin
compose-multiplatform - Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
spark-kotlin - A Spark DSL in idiomatic kotlin // dependency: com.sparkjava:spark-kotlin:1.0.0-alpha
ktor - Framework for quickly creating connected applications in Kotlin with minimal effort
javalin - A simple and modern Java and Kotlin web framework [Moved to: https://github.com/javalin/javalin]
kotlinx.serialization - Kotlin multiplatform / multi-format serialization
kotlindl - High-level Deep Learning Framework written in Kotlin and inspired by Keras
Firefly - Firefly is an asynchronous web framework for rapid development of high-performance web application.
kotlin - Starter project for Kotlin
apollo-android - :robot: A strongly-typed, caching GraphQL client for the JVM, Android, and Kotlin multiplatform.