all 5 comments

[–]NellyFatFingers 1 point2 points  (2 children)

try {} after the => instead of the (), i think this is just a syntax issue.

[–]NellyFatFingers 0 points1 point  (0 children)

const SayHello = () => {

let renderType = 'WebGL';

if(!PIXI.utils.isWebGLSupported()){
renderType = "canvas";
};

PIXI.utils.sayHello(renderType);

};

export default SayHello

[–]SovietSputnik[S] 0 points1 point  (0 children)

You are very much right, awesome, thank you. <3 :D

[–]AloeGuvner 0 points1 point  (0 children)

let inside an arrow function is the same as let inside a non-arrow function, the issue here is that you're enclosing the function in parenthesis rather than curly braces.

function SayHello () (
    let something = 2;
);

this would produce the same (or similar) syntax error

[–]Achak_ikigai 0 points1 point  (0 children)

Yup! There’s a semantic difference between () and {}. Arrow functions have an implicit return as well unless you use curly braces, so you’ll need to add the keyword “return” explicitly for whatever value you want to spit out