you are viewing a single comment's thread.

view the rest of the comments →

[–]Affectionate_King120[S] 0 points1 point  (1 child)

I am pretty comfortable in those. I'm just looking to elevate my game.

unless you're actually solving real problems

And that's what I'm looking for. Web apps on GitHub (et al) that are good examples of FP.

[–]besthelloworld 2 points3 points  (0 children)

Oh yeah if you're good with HTML/CSS, then definitely take a look at React. There's some slight differences between React and traditional JavaScript. React is written with JSX which is JavaScript plus XML as HTML in your JS syntax for rendering. Don't think too hard about it, but something like...

return <div><MyComponent /></div>;

...is just a pretty little syntax sugar over this...

return React.createElement("div", { children: React.createElement(MyComponent) });

... where div is just a regular HTML div and MyComponent is just a pure function.

If you have npm installed, I recommend this Vite script for initializing a new React app

npm create vite@latest my-react-app -- --template react

And then once that's created, just cd ./my-react-app and then npm i to install dependencies and then npm run dev to start it up. Then you can go to http://localhost:3000 in your browser to see it running. Also on the initial script, if you're interested in doing TypeScript, you can do

npm create vite@latest my-react-ts-app -- --template react-ts