With styled-components into the future – 💅 styled-components – Medium

With styled-components into the future  #styledcomponents #react #cssinjs #css #reactjs

  • Those remain the same and intact.While this sounds like no more can be achieved from a library that was mostly about best practices and common patterns in CSS, we are still in a position to drive change in the community.And this is because of the ecosystem that people have created…
  • Even more so with our new docs that we’ve published a few months ago.But the real question is, what makes it the library you know and love?There’s a lot of great content and talks from both Max and Glen, so if you’re new to what the ideas of the library are,…
  • [1]Then we have to transform the CSS to be able to inject it [2], and finally inject your CSS into the stylesheet, at the position that we’ve marked earlier.In v2 and onwards we’ve focused a lot on optimising all of the different steps involved here for performance, but one step…
  • The idea that becomes increasingly important here is, that we can’t build a library that works for some special use cases, but what we can build is a CSS infrastructure that allows you to change the CSS yourself.Let’s see how we could approach this.The interesting thing is that with v1…
  • We can run our transformations during Babel’s transpilation, or during build-time in general.We can build a CSS-in-JS pipeline!This would result in nothing being shipped to the runtime, and as long as we can provide an “opt-in” system, you would still be able to decide whether you’d like to ship the…

styled-components has changed a lot in its past. And we are not even done yet!
Continue reading “With styled-components into the future – 💅 styled-components – Medium”

Part 1: Getting Started With React Native

Ch 11

  • React Native just may be the holy grail of cross-platform app development that many developers and companies have been hoping for.
  • Using React Native, developers can build performant cross-platform native apps much easier than ever before, all with a single programming language: JavaScript.
  • With the growing demand for apps and the increasing complexity that app development entails, React Native comes along at a perfect time.
  • If you’re serious about app development or want to stay ahead of the curve on emerging and disruptive technologies, take a look at React Native.
  • “Great introduction to the rapidly changing world of React and React Native!”

React Native just may be the holy grail of cross-platform app development that many developers and companies have been hoping for. Using React Native, developers can build performant cross-platform native apps much easier than ever before, all with a single programming language: JavaScript. With the growing demand for apps and the increasing complexity that app development entails, React Native comes along at a perfect time. If you’re serious about app development or want to stay ahead of the curve on emerging and disruptive technologies, take a look at React Native.
Continue reading “Part 1: Getting Started With React Native”

Animate React Native UI Elements

Animate React Native UI Elements course by @browniefed #react

  • In this course we will learn and demonstrate the basic concepts of the React Native Animated API.
  • We’ll use Animated calls like and to animate style properties, and learn how to combine animations to create more complex effects.
  • We’ll learn about more advanced interactions like animations with touch events, interpolation, and flip animations.
  • The ultimate goal is to gain an understanding of how to animate React Native Views, how you can apply them to many different types of styles, and how to enhance the experience in your application.

In this course we will learn and demonstrate the basic concepts of the React Native Animated API. We’ll use Animated calls like timing and spring to animate style properties, and learn how to combine animations to create more complex effects. We’ll learn about more advanced interactions like animations with touch events, interpolation, and flip animations. The ultimate goal is to gain an understanding of how to animate React Native Views, how you can apply them to many different types of styles, and how to enhance the experience in your application.

Continue reading “Animate React Native UI Elements”

React JS, Angular & Vue JS

  • There are lots of different frameworks like Angular, React or Vue, libraries and other packages (like webpack).
  • You’ll get an introduction into the three most important JavaScript frameworks (Angular, React.js and Vue.js) and you’ll also get a detailed comparison!
  • This will then allow you to pick other resources or courses to dive super-deep into your chosen framework whilst having a solid foundation already.
  • Throughout the course, we’ll dive into the basics of these frameworks but we’ll also have a look at why we use them to begin with.
  • Not only are we going to dive into the basics of the three most popular JavaScript frameworks, this course will also draw a detailed comparison.

Angular (Angular 2 or 4), React or Vue? Get a Crash Course on each of them and a detailed comparison!
Continue reading “React JS, Angular & Vue JS”

Animate React Native UI Elements

Animate React Native UI Elements course by @browniefed #react

  • In this course we will learn and demonstrate the basic concepts of the React Native Animated API.
  • We’ll use Animated calls like and to animate style properties, and learn how to combine animations to create more complex effects.
  • We’ll learn about more advanced interactions like animations with touch events, interpolation, and flip animations.
  • The ultimate goal is to gain an understanding of how to animate React Native Views, how you can apply them to many different types of styles, and how to enhance the experience in your application.

In this course we will learn and demonstrate the basic concepts of the React Native Animated API. We’ll use Animated calls like `timing` and `spring` to animate style properties, and learn how to combine animations to create more complex effects. We’ll learn about more advanced interactions like animations with touch events, interpolation, and flip animations. The ultimate goal is to gain an understanding of how to animate React Native Views, how you can apply them to many different types of styles, and how to enhance the experience in your application.

Continue reading “Animate React Native UI Elements”

Experiments with High Performance Animation in React Native

Three major methods for shape animation with React Native via @salesforceeng

  • This story is my experience and experiments to achieve high performance animation in React Native.Along the way I learned tons from these blogs and recommend you read them as you dive deeper into building your own animations in React Native:React Native Animations Using Animated API from Nader DabitReact Native ART and D3 from Harry WolffBefore we continue, I would like to define what “high performance animation” in terms of my project.
  • Note: There is another OpenGL binding for React Native which enables a more flexible OpenGL implementation without the interface.Animation in React NativeIn my exploration I tested three major methods (with some variations) for doing shape animation with React Native.
  • For example, if we have a shape with a 1px border, it cannot be transformed to have a larger width/height and retain the same border width without redrawing.Experiments and ResultsRequest Animation Frame + JavaScript tweeningThe first approach is to change nothing but use the same code from the web implementation — meaning everything is done in JavaScript without any help from React Native.
  • The gaps between each country will also get scaled so the transformed shapes are not the same as the new shapes.Zoom animation with fade in/outThis method has a significant impact on the memory footprint since there are two views with a shadow node per shape.Animated + Hybrid Native Driver + Animated Shape (ART)For this approach I still used the Native Driver while I found there is a trick to communicate between the JS thread and UI thread using setNativeProps.
  • I first tried with React Native ART and switched to React Native SVG while both give similar results.Animated + Hybrid Native Driver + Animated Shape (OpenGL)After realizing the bottleneck comes from re-drawing shapes, I switched to another library which has the drawing logic implemented in OpenGL.

Archiving decent animation performance is quite tricky. This story is my experience and experiments to achieve high performance animation in React Native.
Continue reading “Experiments with High Performance Animation in React Native”

How to Animate the Items of a React Native FlatList

  • Be sure to subscribe!Animating EntryTo easily demo our animation we’ll animated to insertion of the list item.
  • When a new item is added to the people array we’ll change the opacity of the row and, via transform, the scale and rotation.It’s important to note that inside the TouchableOpacity we’re using an Animated.View which allows us to modify that component using animated values.First we’ll create a new animated value and, when the component mounts, we’ll change that value from 0 to 1 using Animated.timing.Then we need to drive our UI from these values.
  • We can’t do that in componentWillUnmout because the component will be gone before any animations can run!If you test this out though you’ll see that it doesn’t actually do anything — the row just disappears the same as before.If you comment out the onRemove function you can see that the animation is happening.What we can do is call the onRemove function when the animation completes.
  • We’re now left with some subtle, yet slick, animations for each row item for whenever they’re added or removed.
  • It covers component design, Redux, Redux Saga, and more animations!Want more React Native videos?

I was recently asked about animating items in a React Native list — specifically animating the item when added and removed. That’s what we’ll cover today! To accomplish this we’ll use the FlatList…
Continue reading “How to Animate the Items of a React Native FlatList”