Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 538 Bytes

inlineFunctions.md

File metadata and controls

40 lines (27 loc) · 538 Bytes

Inline functions

React

import React from 'react';

const Name = () => {
    return (
        <button
            type="button"
            onClick={() => console.log("This is a print inside an inline function")}
        >
            Click Me
        </button>
    )
}

Swift

import SwiftUI

struct SwiftUIView: View {

    var body: some View {
        Button("Click Me") {
            print("This is a print inside an inline function")
        }
    }
}

<< Return to index