This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script lang='js'> | |
import {createElement, ref} from '@vue/composition-api'; | |
export default { | |
name: 'App', | |
setup() { | |
const tabs = ['Home', 'Posts', 'Archive']; | |
const currentTab = ref('Home'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package components.common | |
import external_js.WithRouter | |
import external_js.withRouter | |
import index.api.createUser | |
import index.api.dataBase | |
import index.model.User | |
import kotlinx.html.InputType | |
import kotlinx.html.js.onChangeFunction | |
import kotlinx.html.js.onClickFunction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfigWriter | |
val kotlinVersion = "1.3.41" | |
val kotlinxHtmlVersion = "0.6.12" | |
val kotlinExtensionsVersion = "1.0.1-pre.80-kotlin-1.3.41" | |
val reactVersion = "16.8.6-pre.80-kotlin-$kotlinVersion" | |
val reactDomVersion = "16.8.6-pre.80-kotlin-$kotlinVersion" | |
val reactReduxVersion = "5.0.7-pre.80-kotlin-$kotlinVersion" | |
val reduxVersion = "4.0.0-pre.80-kotlin-$kotlinVersion" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package index.store | |
import data_class.Property | |
import redux.RAction | |
data class AddProperty(val property: Property) : RAction | |
data class RemoveProperty(val property: Property) : RAction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package index.store | |
import redux.Reducer | |
import redux.combineReducers | |
import kotlin.reflect.KProperty1 | |
/** | |
* Helper function that combines reducers using [combineReducers] where the keys in the map are | |
* properties of the state object instead of strings with the name of the state's properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package index.store.reducers | |
import data_class.Property | |
import index.store.AddProperty | |
import index.store.RemoveProperty | |
import redux.RAction | |
fun properties(state: Array<Property> = emptyArray(), action: RAction): Array<Property> = | |
when (action) { | |
is AddProperty -> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package index.store | |
import data_class.Property | |
import index.store.reducers.properties | |
import redux.RAction | |
import redux.compose | |
import redux.createStore | |
import redux.rEnhancer | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class App : RComponent<AppDispatch, AppState>() { | |
override fun RBuilder.render() { | |
val property = Property( | |
1, "Test", "Test2", arrayListOf() | |
) | |
props.addProperty(property) | |
div("App-header") { | |
h2 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val kotlinVersion = "1.3.41" | |
val kotlinxHtmlVersion = "0.6.12" | |
val kotlinExtensionsVersion = "1.0.1-pre.80-kotlin-1.3.41" | |
val reactVersion = "16.8.6-pre.80-kotlin-$kotlinVersion" | |
val reactDomVersion = "16.8.6-pre.80-kotlin-$kotlinVersion" | |
plugins { | |
val kotlinVersion = "1.3.41" | |
kotlin("js") version kotlinVersion | |
id("kotlin-dce-js") version kotlinVersion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rootProject.name = "kotlin_dce_duplicate_target" | |
pluginManagement { | |
repositories { | |
jcenter() | |
mavenCentral() | |
gradlePluginPortal() | |
} | |
resolutionStrategy { | |
eachPlugin { |