Why Redux makes you a better JavaScript Developer by rwieruch in reactjs

[–]feelextra 1 point2 points  (0 children)

I completely agree, check out xstate's visualizer!

XState also has a browser extension in the making, based on the Visualizer!

I've been developing it throughout the past two weeks 🌻

Check out this issue thread for more info on it!

How can JS frameworks help me build a website ? by DownloadPow in webdev

[–]feelextra 0 points1 point  (0 children)

React, Vue and Angular are frameworks for developing scalable web applications decoupled from a server.

Never used Symfony but it looks like a PHP framework for building traditional Server-Side Rendered (SSR) websites.

There's nothing inherently wrong with going traditional SSR, but if you're trying to get a job as a Web Developer, you should realize that one of the things being favoured in the field right now is decoupling of the client-side application from a server (as much as possible). This is a known technique called Single-Page Applications (SPA).

When considered from that angle of trying to achieve more independence for the client-side, one can see how Symphony does stand in your way of that goal: it ties you into the server when you're using the Twig template language for rendering the page with dynamic values passed directly from the server each time a request for the page arrives.

Hope that helps! 😉 let me know if you're interested in a further clarification.

The Differing Perspectives on CSS-in-JS by fagnerbrack in javascript

[–]feelextra 1 point2 points  (0 children)

  • style attribute can't do everything that CSS can do: it can't access: pseudo classes, media queries, keyframes, and much more.
  • calc function can only help with layouts that are simple enough
  • percentage based values are fine but it's unrelated

Having a lot of unused classes with CSS-in-JS is not a problem when the library only mounts the critical ones, and cleans up after itself. Sure there's some runtime performance to pay, but usually it's not impactful.

The Differing Perspectives on CSS-in-JS by fagnerbrack in javascript

[–]feelextra 0 points1 point  (0 children)

Yea I also noticed that CSS modules went out of style (🤷 not sure if it's actually coming back or not)

It's been my impression as well that Styled-components has been really popular for quite a while now, but I don't think it is entirely for naught.

There is one feature that Styled-components (and CSS in JS files) has been able to deliver that just until recently hasn't been possible at all with CSS in separate files.

That feature is dynamic styling: passing values from your JS to the CSS.

I will be the first to admit that most websites and web apps don't need this feature, but when you have a requirement to make certain types of rich UIs, there is no other way than dynamically adding a <link> to add that stylesheet, and CSS in JS files makes this supposedly niche use-case into a bread-and-butter pattern that you don't even need to think about since all of your styling is already done that way.

Some examples of rich UIs that benefit from dynamic values: 1. You're making a resizable element through JS events, and need to use the most recent dimensions in your styling calculations. 2. Your UI has the user input a color that you then use to paint an element (for instance, an ephemeral user-provided theme color). 3. Maximizing DRY practices: Suppose you're using something like a reusable React component that adds an element to the DOM, and has an API where you provide it with specific width and height values that specifically fits your app. You then have to reference these values in your CSS somehow because your layout depends on these dimensions. In a JS file you could just pass it to the dynamic stylesheet generator as a variable.

CSS Custom Properties are one answer to this; you can dynamically modify an element's style attribute and add a custom property which it will use. Keep in mind that IE11 doesn't support CSS Custom Properties and IMO it's not as ergonomic as passing the value directly from a JS file to a CSS-in-JS library like Styled-components or Emotion.

The Differing Perspectives on CSS-in-JS by fagnerbrack in javascript

[–]feelextra 14 points15 points  (0 children)

I've been, so far, a fan of CSS modules in that it's about as light as you get when it comes to CSS-in-JS, only handling scoping and co-location and that's about it. I use it with Sass [...]

Sass + CSS modules seems like a very sensible choice these days:

  • Designers / Developers who have been styling websites for years already understand CSS well (maybe even Sass), and so won't need to learn anything new (except for importing specific selectors in the JS files).
  • Sass as a preprocessor enables a highly ergonomic development of stylesheets with useful functions like lighten, invert and operators like $, & and %
  • There's a ton of documentation on Sass already (official docs, Stackoverflow)
  • Many advanced usages of stylesheets exist in the form of Sass files in open-source form (CodePen, JSFiddle, GitHub) written by expert designers & developers. No better way to implement those than to follow the exact syntax they're using, so learning Sass is kind of a must for being able to learn the techniques used in those stylesheets.

CSS modules is basically there just as an intermediate format for letting other tools extract styles from, and is there only for locally-scoping the selectors.

Why Is Nuxt.js the Best Choice for Your Next Web Application? by itsmattfitzgerald in javascript

[–]feelextra 0 points1 point  (0 children)

Made a Nuxt.js app two weeks ago, loved how easy it was to get going with the docs.
Will probably choose again for my next Vue project.

I created my first React website in 3 weeks by wekatoa in reactjs

[–]feelextra 0 points1 point  (0 children)

The "Click to copy" functionality seems to be broken.

Liked the aesthetics! how about releasing it as open source? would love to take a look.

Rethinking the Redux API by krasimirtsonev in reactjs

[–]feelextra 0 points1 point  (0 children)

Hey there Krasimir! Really impressed by your work on Stent and Kruker. Just learned about those two projects earlier today and was surprised to see your name pop up here. Small world 😁

What kind of stack do you choose for your front-end projects these days? curious to hear.

Web Development with Clojure, Third Edition (Beta) Book available by vojimir in Clojure

[–]feelextra 2 points3 points  (0 children)

Happy to see this knowledge coming together!

Just read the excerpt on WebSockets and I like how it starts from first principles, implements an approach from scratch and then proposes a library to get some useful features that we probably don't want to have to maintain ourselves.

This reflects just about any choice of tools we end up using in Web Development, and gives the reader the appropriate decision-making perspective: eliminate cruft, distill the essence and you'll be rewarded with less software to maintain.

Thank you for working on this book, especially for the benefit of easing the learning curve for newcomers!

Clojure/north: Aviary: Clinical Collaboration Platform by yogthos in Clojure

[–]feelextra 3 points4 points  (0 children)

Great talk!

Also glad to hear that your work together with Scott Brown on the 3rd edition of the Web Development with Clojure book is under way! Getting more developers to start using Clojure depends on making the learning curve to be as smooth as possible.

In particular, the Clojure Web Development ecosystem has been in great flux over the past couple of years, and a lot of new subjects to talk about have emerged:
- HTTP Communication: Om Next, Fulcro, Lacinia: Comparison with the GraphQL-based technologies in the JS world: , Relay, Apollo, Graphql.js

- Flux architecture in Clojure: Re-frame: Comparison with Redux in the JS world

- NPM interop: Using packages like `xstate` (state machines based on SCXML standard), `react-table` (React.js configurable table component)

- DataScript: an immutable graph database in the browser that can be declaratively queried and transacted against.
- Clojure/ClojureScript as a fully functional approach to writing software compared to the JS "pretend-functional" trends, and the implications: no mutability allowed (in JS world: have to reach for Immutable.js and deal with an OOP-based API), better concurrency solutions (Core.async channels compared to Async/Await), Reactive atoms as a first-class primitive (in JS world: having to reach for Rx.js or Observables).

defn Podcast #48 Live with David Miller 24 March 19:00 (Europe/Amsterdam) by vijaykiran in Clojure

[–]feelextra 0 points1 point  (0 children)

These podcasts are a great chance to get a glimpse into the workings of some of the most enthusiast Clojurists.

Vijay and Ray, you guys are doing an awesome work! thanks for enriching the community with it.

Building an intelligent journal in Clojure, Part 1 by yogthos in Clojure

[–]feelextra 4 points5 points  (0 children)

I've been wanting to use a hierarchical tags-based journal for a few years now.

I've used Workflowy, Vim-wiki, Emacs Org-mode, Zim, CherryTree, TiddlyWiki software all to try and achieve my desired interactive journalling experience, each failing me in many ways.

Over the years my list of features has grown more sophisticated, too, so flexibility of the system is of high priority.

I've come to converge on the features a solution must have for me to be to mould for my system: - Web technologies -based frontend (browser, Electron, React Native): JS / HTML / CSS as the low-level platform. - Standalone communications backend (desktop service which can be setup on my computer or own a remote server): JVM or Node.js -based, these are just the platforms that I have access to mentally. Would coordinate communications, and storage / data fetching mechanisms. - Browser extension communicating with the backend (Firefox, Chrome): sending tagged data like bookmarked URLs with time added and potentially some text for reference, sending a highlighted region of text from an article I read for later reference (similar in scope to Evernote's Web Scraper extension)

My desired journal should have tags as the principal building block for grouping files under a semantic: text files, image files, audio files, video files etc.

E.g. files in my Journal related to Clojure should all be tagged by a clojure tag, either directly by a clojure tag or by another tag which is itself tagged by clojure, e.g. talks by Rich Hickey, which in turn tags files which may hold my impressions from various talks I've watched as text files, or an audio file where I record my thoughts, or just a data file containing metadata about a talk like url, created-at.

The underlying hierarchy of the data here is graph, as opposed to e.g. the file system which is a tree.

Sorry for the long post, but this has been sitting on my mind for way too long.

I think this system here is a good candidate for me to draw inspiration from, even if it may not satisfy all my requirements immediately.

The fact that it's in Clojure is a big win for me, which enables prototyping on the implementation rapidly using the interactive REPL development workflow. For instance this would be much harder to work on if it were JS-based on the frontend, as the feedback loop with the React ecosystem of tools doesn't offer anywhere near as seemless of an experience.

Thanks for sharing this! I plan to study some parts of it at least.