Const
Must be called on the top scope of component
const Component = (props: {}) => { const ctx = getCurrentScene(); return '';}; Copy
const Component = (props: {}) => { const ctx = getCurrentScene(); return '';};
DO NOT call on other place
const Component = (props: {}) => { const fn = () => { const ctx = getCurrentScene(); // WRONG! }; return '';}; Copy
const Component = (props: {}) => { const fn = () => { const ctx = getCurrentScene(); // WRONG! }; return '';};
Example
Must be called on the top scope of component
DO NOT call on other place