Search

Nalezeno "jsx": 22

Fix Seeing “0” in Your JSX Code


The early days of the web felt like the wild west when it came to coding practices — just make it work. Then we became enlightened to better practices, separating HTML from CSS and JavaScript. Then came React and JSX, where we combine JavaScript, HTML, and even CSS with Styled Components...

React Without Build Tools


Jim Nielsen: I think you’ll find it quite refreshing to use React A) with a JSX-like syntax, and B) without any kind of build tooling. Refreshing indeed: CodePen Embed Fallback It’s not really the React that’s the hard part … The post React Without Build Tools appeared first...

How to Add Native Keyword Aliases to Babel


Those of you who follow this blog know that not every blog post is an endorsement of a technique but simply a tutorial how to accomplish something.  Sometimes the technique described is probably not something you should do.  This is one of those blog posts. The Babel parser is an essential tool...

CSS2JS


To add inline styles on an element in JSX, you have to do it in this object syntax, like: <div style={{ fontSize: 16, marginBottom: "1rem" }}Content </div That might look a little weird to us folks who are so used to the CSS syntax, where it is font-size (not fontSize), margin-bottom...

Considerations for Creating a Card Component


Here's a Card component in React: const Card = props ={ return( <div className="card"<h2{props.title}</h2<p{props.content}</p</div) } It might be pretty useful! If you end up using this thing hundreds of times, now you have the ability to refactor a little bit of HTML...

Apollo GraphQL without JavaScript


It's cool to see progressive enhancement being done even while using the fanciest of the fancy front-end technologies. This is a button in a JSX React component that has a click handler applied directly to it that fires a data mutation Ajax request through Apollo GraphQL. That is about the least...

PHP Templating in Just PHP


With stuff like template literals in JavaScript and templating languages, like JSX, I've gotten used to wanting to write my HTML templates in one nice chunk and sprinkling in variables wherever I need them. I had a situation where I needed to do that in "raw" PHP the other day, so I'm just...

How to Modify Nodes in an Abstract Syntax Tree


One of the more powerful concepts I've stumbled across recently is the idea of abstract syntax trees, or ASTs. If you've ever studied alchemy, you may recall that the whole motivation for alchemists was to discover some way to transform not-gold into gold through scientific or arcane methods. ASTs...

What I Like About Writing Styles with Svelte


There’s been a lot of well-deserved hype around Svelte recently, with the project accumulating over 24,000 GitHub stars. Arguably the simplest JavaScript framework out there, Svelte was written by Rich Harris, the developer behind Rollup. There’s a lot to like about Svelte (performance, built-in...

Collective #547


How Video Games Inspire Great UX * js-noisy-gradient * PowerToys * SVG to JSX * Google Engineering Practices Documentation Collective #547 was written by Pedro Botelho and published on Codrops

React Starter: How does JSX make HTML elements?


JSX makes making React components easier. Some may find JSX to have a high learning curve and that's totally understandable. It's not exactly HTML and it's not exactly JavaScript, so it can take so

React Starter: JSX Gotchas


JSX is a very powerful technology. With all new things that we have to learn, there is a bit of a learning curve. Let's talk about some of the gotchas when using JSX. These are some common things t

React Starter: The Many Ways to Return JSX


JSX is a great tool because it has so much flexibility. There are many ways to achieve the same thing. For this reason, it can be confusing for new developers when they see different tactics for de

React Starter: JSX Basics


JSX is the templating language for React. JSX is also one of the main reasons why devs say they dislike React at first. As with all new tools, there will be a learning curve. JSX is no diffe

Naming things to improve accessibility


I like the this wrap-up statement from Hidde de Vries: In modern browsers, our markup becomes an accessibility tree that ultimately informs what our interface looks like to assistive technologies. It doesn’t matter as much whether you’ve written this markup: in a .html file in Twig, Handlebars...

React indeterminate


I’ve fallen in love with React.js and JSX over the years; state-based rendering and a logical workflow have made me see the light of this modern framework. That doesn’t mean I don’t sometimes get a bit frustrated that the “simple” things seem harder than they should...

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace