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
// Shortened example | |
// in Exercise/index.jsx | |
import withState from 'components/withState'; | |
import { createExercise } from './createExercise'; | |
import { Exercise as ExerciseUi } from './Exercise'; | |
export const Exercise = withState(ExerciseUi, (props) => createExercise(props.skill)); | |
// in withState.jsx | |
import { mergeProps } from "solid-js"; |
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 A | |
def access_bar | |
puts "#{self} accessing bar. Bar is #{bar}" | |
end | |
def access_foo(fooer) | |
print "#{self} sends `foo` message which is " | |
puts fooer.foo | |
end |
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
pc.script.create('fpsCounter', function (app) { | |
// Creates a new FpsCounter instance | |
var FpsCounter = function (entity) { | |
this.entity = entity; // The scene object | |
this.fpsCount = 0; | |
this.counterEl = null; | |
this.insertBeforeElId = "application-canvas"; | |
}; |