Sneak Peek: Beyond React 16

  • The talk opens with a question: “With vast differences in computing power and network speed, how do we deliver the best user experience for everyone?”
  • On the first demo, Dan says: “We’ve built a generic way to ensure that high-priority updates don’t get blocked by a low-priority update, called time slicing.
  • On the second demo, Dan explains: “We’ve built a generic way for components to suspend rendering while they load async data, which we call suspense.
  • You can pause any state update until the data is ready, and you can add async loading to any component deep in the tree without plumbing all the props and state through your app and hoisting the logic.
  • On a slow network, you can intentionally design which loading states the user should see and how granular or coarse they should be, instead of showing spinners based on how the code is written.

Continue reading “Sneak Peek: Beyond React 16”

Sneak Peek: Beyond React 16

  • The talk opens with a question: “With vast differences in computing power and network speed, how do we deliver the best user experience for everyone?”
  • If my device is fast enough, it feels almost like it’s synchronous; if my device is slow, the app still feels responsive.
  • Notice that only the final state was displayed; the rendered screen is always consistent and we don’t see visual artifacts of slow rendering causing a janky user experience.”
  • On the second demo, Dan explains: “We’ve built a generic way for components to suspend rendering while they load async data.
  • On a slow network, you can intentionally design which loading states the user should see and how granular or coarse they should be, instead of showing spinners based on how the code is written.

Continue reading “Sneak Peek: Beyond React 16”

I’m literally refactoring source code of a #comics. How awesome is that? #ReactJS #CSS

I'm literally refactoring source code of a #comics. How awesome is that?  #ReactJS #CSS

  • This project was bootstrapped with Create React App.
  • This project is very immature.

gradient-company – CSS comics
Continue reading “I’m literally refactoring source code of a #comics. How awesome is that? #ReactJS #CSS”

Introducing Sideswipe: a cross-platform carousel for React Native

  • Ideally we want to animate based on scroll position, not index changes, which would provide a much smoother effect.Old solution for handling transitions between itemsI knew I could add an Animated.event to the FlatList and pass the animated value to the child components but the value would be the raw…
  • This means the components using the animated value would have do some math to figure out if they were the active index.
  • It also updates any time either one of the underlying animated values updates.What this means is we can divide the scroll position by the width of a child item (which is a required prop) and that will give us an animated value starting at 0 and ending at the length…
  • Now child components can animate based on their index instead of scroll position but the animation will still be based on scroll position under the hood.
  • Here’s what that looks like in code:Using Animated.divide to get animated value for carousel itemsNow each carousel item gets an animated value they can use to create entrance and exit animations based on their index in the list, not the scroll position of the underlying FlatList, this provides a much…

Recently I found myself in need of a flexible carousel solution that could support some pretty tough requirements, mainly: My first attempt was to utilize open-source and use something someone else…
Continue reading “Introducing Sideswipe: a cross-platform carousel for React Native”

ComponentDoesWhat? React Native Cheat Sheets – Erin Fox – Medium

  • React Native Cheat SheetsBefore I started my job at Major League Soccer, I only had one week of React training.
  • Great news when I was about to join a team of React engineers to rebuild their mobile app in React Native, right?Over 6 months have gone by now and I have learned SO MUCH, it’s crazy.
  • (oh, but ++ because it’s build in React)Flex of Dror BiranThere’s been days when I wanted to pull my hair out because my flex style properties weren’t working the way I wanted them too.
  • Even the zombies help.SVG feel like an SVG queen whenever I use this handy conversion site.Easing only is it really fun to hover over all of these functions to see their animations, it’s really helpful.Images (when you have spend way to much time trying to find placeholder photos.
  • Command r. Command much (almost) everything you need to get started with GraphQL is here.

Before I started my job at Major League Soccer, I only had one week of React training. Great news when I was about to join a team of React engineers to rebuild their mobile app in React Native…
Continue reading “ComponentDoesWhat? React Native Cheat Sheets – Erin Fox – Medium”

Android or React Native?

  • I am a proficient iOS/Swift developer and I am keen to develop an app on the Android platform.
  • I am also a realist and I know that the time available to me is limited.
  • Q : Will my time be better spent learning React-Native – or – Android Java/Kotlin?

I’m a proficient iOS / Swift developer and I want to have a go at developing on the Android platform. How should I do that?
Continue reading “Android or React Native?”

Understanding The React Source Code — Initial Rendering (Class Component) IV

Understanding The #ReactJS Source #Code IV:  via @hackernoon #Javascript

  • /App.css’;class App extends Component { constructor(props) { super(props); this.state = { desc: ‘start’, }; }render() { return ( div className=”App” div className=”App-header” img src=”main.jpg” className=”App-logo” alt=”logo” / h1 “Welcom to React” /h1 /div p className=”App-intro” { this.state.desc } /p /div ); }}export default App;App@App.jsAs mentioned, the component above is rendered…
  • /App.css’;class App extends Component { constructor(props) { super(props); this.state = { desc: ‘start’, }; } render() { return React.createElement( ‘div’, { className: ‘App’ }, React.createElement( ‘div’, { className: ‘App-header’ }, React.createElement( ‘img’, { src: “main.jpg”, className: ‘App-logo’, alt: ‘logo’ } ), React.createElement( ‘h1’, null, ‘ “Welcom to React” ‘ )…
  • Initialize designated data structure:The step is the same as well:1) ReactDOMContainerInfo[ins] represents the container DOM element, TopLevelWrapper is instantiated (TopLevelWrapper[ins]) and is set to alongside the initialization of other properties;3) Again, mountComponentIntoNode is the cross point of upper and lower half, within which returns a complete DOMLazyTree that can be…
  • After those operations complete, the logic processes to the first ramification that is specific to class a `ReactCompositeComponent` from `ReactElement[1]`This step strips the wrapper and creates another ReactCompositeComponent instance to reflect the class component, App.The designated data structure:The call stack in | | | /* we are here */ |…
  • _renderedComponent = child; var markup = transaction, hostParent, hostContainerInfo, debugID); // scr: 3)…// scr: DEV code return designated data structure:The call stack in | | | upper half | /* we are here */ | |Same as in {post two}, the most important task of this step is to instantiate…

Understanding The React Source Code I
Understanding The React Source Code II
Understanding The React Source Code III
Understanding The React Source Code IV (this one) We have completed the rendering…
Continue reading “Understanding The React Source Code — Initial Rendering (Class Component) IV”

JavaScript { Part 14.2 : Libraries } – codeburst

  • IntlThis is a global object, yes and object!
  • (More info here)Previously I said that the Intl is an object and actually most of the functionality is accessed by that object Intl, you need to remember that in order to use it and three main word methodsWhen can you use it?Actually most of the browsers support it, but to be…

Its a collection of sites where you could find awesome things in order to make better your work and not reinvent the wheel.
Continue reading “JavaScript { Part 14.2 : Libraries } – codeburst”

Supercharge Your React Native Development With React-Native-Debugger

  • Supercharge Your React Native Development With React-Native-DebuggerReact Native Debugger App IconThere will always be bugs — we will never run out of them.
  • There is struggle and get frustated debugging, and then there is chilling debugging where there is a tool to help you save time and effort.As the wise Edsger Dijkstra once saidIf debugging is the process of removing software bugs, then programming must be the process of putting them in.What is React…
  • It combines 3 very important debugging tools to make your development life cycle awesome.Screenshot of React Native Debugger zero stateReact Developer Tools lets you inspect the React component hierarchy, including component props and state.
  • It gives you the ability to inspect/change elements in your react native app just like you would in your web browser for webpagesRedux DevTools lets you inspect every state and action payload change.
  • When you print to the console with console.log in your code or use the debugger statement, you can see them in your Chrome devtools.React Native Debugger brings all these tools together and makes your development life a whole lot easier, trust me.

There will always be bugs — we will never run out of them. There is struggle and get frustated debugging, and then there is chilling debugging where there is a tool to help you save time and effort…
Continue reading “Supercharge Your React Native Development With React-Native-Debugger”

We built our entire startup on React Native and this is what we found out

We built our entire startup on #ReactNative and this is what we found out:  #developer

  • However with the Android market share being pretty high, we had to make sure our app worked on both Android and iOS.
  • We wanted the iOS app to look and feel native.That’s where React Native came into the picture.
  • Could React Native pull this off and still look native?A few months down the line, with our iOS and Android app on the respective stores, I can tell you the journey was nothing but spectacular.
  • But hey, if we could go from an iOS app to fully functional Android app in 2 days, can it really get any better?Honestly I have never written an app for iOS on objective C that didn’t crash during beta testing a few times.
  • And to my amazement, our React Native app on iOS is yet to crash even once during production run.

At Genie! we like to spend most of our time giving our users the best experience to send and receive gifts. However I only had expertise writing apps for iOS and not Android. When we first decided to…
Continue reading “We built our entire startup on React Native and this is what we found out”