Implementing an Infinite Scroll with Vue.js ← Alligator.io

Implementing an Infinite Scroll with Vue.js  #UI #reactjs #javascript #react

  • For this post, we’ll go without a plugin or package and we’re going to be writing a simple JavaScript function that fetches a new set of data when scrolled to the bottom of the browser window.
  • Before we start integrating the infinite scroll, let’s fetch and set some initial data on page load: – – It’s worth noting that it’s not recommended to make five services calls on load.
  • We’ll make use of the document object’s , properties and of window’s properties to determine if scroll as at the bottom: – – Inside this condition, let’s add a service method with Axios to fetch another random user from the Random User API.
  • This function makes a service call and adds a new random “user” to the array only when the user scrolls to the bottom of the page.
  • With each scroll to the bottom of the page, we fetch new data with Axios then push that data to an array.

Learn how to implement a simple infinite scroll for your Vue apps using nothing but some vanilla JavaScript and a simple Random User API.
Continue reading “Implementing an Infinite Scroll with Vue.js ← Alligator.io”

Advanced React Patterns — Exclusive Workshop

  • Making React components that can be used in multiple places is not hard.
  • What is hard is when the use cases differ.
  • Without the right patterns, you can find yourself with a highly complex component that requires a lot of configuration props and way too many if statements.

Join Kent C. Dodds and learn how to master React components.
Continue reading “Advanced React Patterns — Exclusive Workshop”

React’s safe Context API – codeburst

  • It’s purpose is to aid with that specific scenario ğŸ�‰ – But in older versions of React, you should not use it âš ï¸� – If you want your application to be stable, don’t use context.
  • You can read about the drawbacks of the current Context API here 📖 – The good news is there’s a new Context API in React@16.3! And it’s much better 🙌 – So, if you hadn’t heard of or used the Context API until now, there’s no need for FOMO 😅…
  • Here’s a demo of a theme toggle using the new safe version that’s currently obtainable in React@16.3ğŸ‘� – When would I need the Context API?It’s hard to think of an array of scenarios in which you’d need to use the Context API.
  • In many cases it will probably suffice ğŸ‘� – How might we handle it with the Context API?I’m not going to touch on the current release version of the Context API as the docs deter us from using it âš ï¸� – Instead we can take a look at how a solution…
  • Updating it might look like this – The consumer will pass a single render prop which is the current value for the Context ğŸ‘� – Much like Providers, you can have many Consumers within the component tree.

Ever needed to pass a prop down through many levels of the component tree? Did you do it manually? It’s not ideal is it? Did it have to pass through components where it looked out of place? The…
Continue reading “React’s safe Context API – codeburst”

eBay Europe Technology #ebaytechtalk (Berlin, Deutschland)

  • Building a new web app on a green field is every developer’s dream.
  • Patrick shares the story of his own green field project, the relaunch of the online community MOTOR-TALK.
  • You’ll take away hands-on advice from real-world experience, to help you make your own code a little better every day, too!
  • Bio: Patrick Hund, lead frontend developer at mobile.de Patrick helps React and Node.js conquer the tech stack at eBay in Berlin.
  • Notable projects include relaunching the homepage of eBay’s car trading platform mobile.de in 2015 and the ongoing rewrite of eBay’s automotive online community MOTOR-TALK.

Product & development meetups coordinated across eBay’s European offices in London and Berlin. We want to support tech innovation in our communities. We also want great people to join our teams and ge
Continue reading “eBay Europe Technology #ebaytechtalk (Berlin, Deutschland)”

Learning Redux-Saga #javascript #reactjs #redux #redux-saga

Learning Redux-Saga  #javascript #reactjs #redux #redux-saga

  • Redux-saga is a Redux middleware to handle side effects, mainly the asynchronous actions which change the state.
  • A saga is a generator function that can run asynchronous actions indefinitely like a thread in the application.
  • On the other hand, Redux-saga uses the generators which can pause, resume, and interact with the asynchronous actions by using generators.
  • Each of the following functions will return a saga effect which is an object containing instructions of what/how the action should be executed by the saga middleware.
  • takeEvery – – Resolve the effect with the result of each time that the action is received.

Redux-saga is a Redux middleware to handle side effects, mainly the asynchronous actions which change the state. A saga is a generator function that can run asynchronous actions indefinitely like a thread in the application.
Continue reading “Learning Redux-Saga #javascript #reactjs #redux #redux-saga”

Learning Redux-Saga #javascript #reactjs #redux #redux-saga

Learning Redux-Saga  #javascript #reactjs #redux #redux-saga

  • Redux-saga is a Redux middleware to handle side effects, mainly the asynchronous actions which change the state.
  • A saga is a generator function that can run asynchronous actions indefinitely like a thread in the application.
  • On the other hand, Redux-saga uses the generators which can pause, resume, and interact with the asynchronous actions by using generators.
  • Each of the following functions will return a saga effect which is an object containing instructions of what/how the action should be executed by the saga middleware.
  • takeEvery – – Resolve the effect with the result of each time that the action is received.

Redux-saga is a Redux middleware to handle side effects, mainly the asynchronous actions which change the state. A saga is a generator function that can run asynchronous actions indefinitely like a thread in the application.
Continue reading “Learning Redux-Saga #javascript #reactjs #redux #redux-saga”

Vue.js, React Native, Node.js and JS Testing – Bulgaria Web Summit 2018 – Medium

  • Talk by Kaloyan Kosev: React Native App — Expectations vs Reality.superKaloI had a chance to be part of a team that started developing a decent size React Native mobile app from scratch.
  • As a developer with a solid React background, I had some expectations at first.
  • During my initial research, everything sounded terrific: performance stats, ease of development, learn-once-use-everywhere, debugging tools, etc.
  • But is everything terrific really?I’m excited to share my journey about how my expectations met the reality.
  • I’ll also try to address the most popular misconceptions about React Native, which front-end developers usually have before they have the chance to actually built something.

As the applications we write tests against grow more complex we might stumble into testing errors stemming from asynchronous and time-dependent behaviour. This talk will characterize several…
Continue reading “Vue.js, React Native, Node.js and JS Testing – Bulgaria Web Summit 2018 – Medium”

A Front End Developer’s Guide to GraphQL

A Front End developer’s guide to GraphQL  #GraphlQL #ReactJS

  • In this post, we’ll walk through a couple of hands-on examples to show you how integrating GraphQL into your application will solve many pain points working with remote data.
  • On the backend, you’ll use Apollo Server to create a GraphQL server, which is a single endpoint that parses a GraphQL request and returns data.
  • You’ll connect your GraphQL server to your application with Apollo Client, a fast and flexible client that fetches, caches, and updates your data for you.
  • This common frustration no longer exists with GraphQL because the data you consume on the client is no longer coupled to an endpoint’s resource.
  • In this example, React Apollo, Apollo Client’s React integration, is binding our exchange rate query to our ExchangeRateList component.

No matter how large or small your application is, you’ll have to deal with fetching data from a remote server at some point. On the front end, this usually
Continue reading “A Front End Developer’s Guide to GraphQL”

busypeoples/IntroductionToFlow.md Last active Oct 8, 2017

  • Intended for developers interested in getting started with Flow.
  • At the end of this introduction, you should have a solid understanding of Flow and how to apply it when building an application.
  • Covers all the basics needed to get started with Flow.
  • Covers all the basic needed to get started with Flow and ReactJS.

Intended for developers interested in getting started with Flow.
At the end of this introduction, you should have a solid understanding of Flow and how to apply it when building an application.
Continue reading “busypeoples/IntroductionToFlow.md Last active Oct 8, 2017”

Props and Data Flow in ReactJS – Kenlyn Terai – Medium

Props and Data Flow in #ReactJS:  #JavaScript

  • (3) There are only two requirements that define a JavaScript function as a React component:The function accepts a single “props” object argument with dataIt returns a React elementA simple “Functional” componentThe equivalent “Class” componentWhether you declare a component as a function or a class, it must never modify its own props.
  • All React components must act like pure functions with respect to their props.
  • = BoringTo sum up what props are in React, theyAre data passed to components — values can be anything: a string, an array, functions, and so onAre immutableEnable components to become more reusableSo, if props are read-only, what place do they have in creating dynamic web applications?
  • The render() method also calls the diff algorithm which recognizes any changes in the component and logs them for batching to the “real” DOM.Credit: Tarun Sharma: “Understanding virtual DOM react js” from React DocsHere is an example from Components and Props in the React Docs.
  • This code renders “Hello, Sara” on the page:function Welcome(props) { return h1Hello, {props.name}/h1;}const element = Welcome name=”Sara” /;ReactDOM.render( element, it on CodePen.Let’s recap what happens in this example:We call ReactDOM.render() with the Welcome name=”Sara” / element.React calls the Welcome component with {name: ‘Sara’} as the props.Our Welcome component returns a h1Hello, Sara/h1 element as the result.React DOM efficiently updates the DOM to match h1Hello, Sara/h1.

ReactJS comes with a slew of new words and new definitions for existing ones. “Props” is no exception. To understand the meaning of “props” in ReactJS, I turned to the context where it is used — in…
Continue reading “Props and Data Flow in ReactJS – Kenlyn Terai – Medium”