- Lottie is a mobile library for Web, and iOS that parses Adobe After Effects animations exported as json with Bodymovin and renders them natively on mobile!
- Install the zxp manually following the instructions here: Skip directly to “Install third-party extensions” – – Or you can use the script file from here: Or get it directly from the AE plugin clicking on Get Player – – Here’s a video tutorial explaining how to export a basic animation…
- — with 1 optional parameter name to target a specific animation – – bodymovin.stop() — with 1 optional parameter name to target a specific animation – – bodymovin.setSpeed() — first argument speed (1 is normal speed) — with 1 optional parameter name to target a specific animation – – bodymovin.setDirection()…
- — with 1 optional parameter name to target a specific animation – – bodymovin.searchAnimations() — looks for elements with class “bodymovin” – – bodymovin.loadAnimation() — Explained above.
- you can also use addEventListener with the following events: – – Doing this you will have to handle the canvas clearing after each frame – – Another way to load animations is adding specific attributes to a dom element.
lottie-web – Render After Effects animations natively on Web, Android and iOS, and React Native. http://airbnb.io/lottie/
Continue reading “Lottie – Render After Effects animations natively on Web, Android and iOS, and React Native”
- Thunks in Redux: The BasicsWhat Thunks Are, What They Solve, Other OptionsThis article was born as a gist for React Redux beginners, intended to demystify what thunks are and the motivation for using them.Redux was created by Dan Abramov for a talk.
- It provides a predictable approach to managing state that benefits from immutability, keeps business logic contained, acts as the single source of truth, and has a very small API.The synchronous and pure flow of data through Redux’s components is well-defined with distinct, simple roles.
- Notice how a thunk (the function returned from thunkedYell(…)) requires an extra invocation before the work is executed:Here the potential work involves a side effect (logging), but thunks can also wrap calculations that might be slow, or even unending.
- In any case, other code can subsequently decide whether to actually run the thunk:Aside: LazinessLazy languages like Haskell treat function arguments as thunks automatically, allowing for “infinite” computed-on-demand lists and clever compiler optimizations.
- Thunks in React ReduxIn React / Redux, thunks enable us to avoid directly causing side effects in our actions, action creators, or components.
For React & Redux beginners, intended to demystify thunks and the motivation for using them.
Continue reading “Thunks in Redux: The Basics – Fullstack Academy – Medium”
- Graphically, this is the schema of a Redux app: – – Basically, Redux does the following: – – An OTP GenServer does the following: – – In short, we can use the same mental model for the client and server side.
- We can dispatch events to Elixir, compute a new version state server side, propagate this state to redux, and our views will get updated automatically.
- We have just implemented the thick red arrows: – – We will update the store with the state that comes from the server in two different situations.
- With this, we have connected the server state with Redux state.
- But, if you want to have state shared between different users, or we want to have pieces of the state in the server for other reasons, such as enforcing validation rules, we can use the same mental mode with Elixir GenServers.
Digital solutions partner. High quality work with Symfony, React and Elixir.
Continue reading “The joy of React+Redux with Elixir/OTP”
- Angular.js is often referred to as an MVW (Model-View-Whatever) framework and among the top benefits, for startups and mid-sized companies, people name: quick code production, easy testing of any app part and two-way data binding (changes in the backend are immediately reflected on the UI).
- As for now, it is reasonably called the most used JS framework for SPAs (Single-Page Applications) development and it boasts the largest community of developers.
- It makes creating forms in React Native easy by simply having to define a model for that form and you’re set!
- Snack will automatically pull that in for us.Tip: I find that scanning the QR code from the Expo app on my device gives the best development experience.If you prefer to do this outside of Snack make sure you install tcomb-form-native via npm or yarn.What We’re BuildingWe’ll be building a sign up…
- First we need to get the Form component (line 6) then we need to render the form and pass our model to it as the type (line 19).
- We create an object, add a key named “fields” (since we’re modifying the fields), add a key to this object that aligns with the key in our model (“terms”), and then inside that object we set the new label.Code is easier to understand.Then pass those options to the Form componentLet’s…
- Just about everything in the default form is customizable.As you can see tcomb-form-native makes building forms quick and easy but also gives you the flexibility you need to create forms the give users the necessary info and fit with the rest of your app (unless I’m designing of course).
If you’re building a React Native app it’s almost a guarantee that you’ll have to build at least one form. The reality is you’ll probably build quite a few (sign in, sign up, edit profile, etc.) Yeah…
Continue reading “Easily Build Forms in React Native – React Native Development – Medium”
Facts about React that should be known before using Redux (or MobX). Most important: Learn React first, then opt-in Redux…
Continue reading “8 things to learn in React before using Redux”
- In this article, I’ll talk you through the decisions I make when building React application: picking tools, structuring files, and breaking components up into smaller pieces.
- Once you’ve done that you can always import files relative to the directory:
Whilst this does tie your application code to Webpack, I think it’s a worthwhile trade-off because it makes your code much easier to follow and imports much easier to add, so this is a step I’ll take with all new projects.
- For example, we have a folder called that contains all components relating to the shopping cart view, and a folder called that contains code for listing things users can buy on a page.
- Following on from the previous rule, we stick to a convention of one React component file, and the component should always be the default export.
- Normally our React files look like so:
In the case that we have to wrap the component in order to connect it to a Redux data store, for example, the fully wrapped component becomes the default export:
You’ll notice that we still export the original component; this is really useful for testing where you can work with the “plain” component and not have to set up Redux in your unit tests.
I’ll talk you through the decisions I make when building React applications :picking tools, structuring files,and breaking components up into smaller pieces
Continue reading “Organize a Large React Application and Make It Scale”