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 Ref(var value: Int) | |
// Note the inline function below which ensures that this function is essentially | |
// copied at the call site to ensure that its logging only recompositions from the | |
// original call site. | |
@Composable | |
inline fun LogCompositions(tag: String, msg: String) { | |
if (BuildConfig.DEBUG) { | |
val ref = remember { Ref(0) } | |
SideEffect { ref.value++ } |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# Copyright (C) 2015-2017 Carlos Jenkins <carlos@jenkins.co.cr> | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |