Styling React for Reuse

  • We’ve all excitedly installed a third-party component that beautifully fit our functional needs, only to sacrifice design, and waste hours covering our code in !
  • Between state-based components, class naming conventions, and the inline versus stylesheet wars, it’s difficult to wrap your head around your own components, let alone releasing them for reuse.
  • In this session, we’ll take all that information and distill it into an easy to digest discussion for those who are looking to standardize their own components, or release their first components for public use.
  • My goal is to help the community, at large, think about CSS in their OSS components in an extensible way.

In this session, we’ll take all that information and distill it into an easy to digest discussion for those who are looking to standardize their own components, or release their first components for public use.
Continue reading “Styling React for Reuse”

How to display Draft.js content as HTML – tuomo.me

How to display Draft.js content as HTML  #webdevelopment #webdev #ReactJS #react #javascript

  • At first however, it might not be so clear how to take the rich text representation that is created by Draft.js (=ContentState) and display it as HTML.
  • Draft.js itself doesn’t have an API to convert the content state to HTML.
  • One way to export your content state to HTML is to use npm package provides stateToHtml method which takes ContentState object as parameter and returns the content state as html.
  • Here is an example for a component that has Draft.js editor and as you type the editor’s content is displayed as html.
  • Getting HTML content of Draft.js editor is quite straight forward.

Continue reading “How to display Draft.js content as HTML – tuomo.me”

Why I decided to move from Android to React Native – CloudBoost

Why I decided to move from Android to #reactnative

  • There were several reasons why I chose React Native as my new framework and I want to share with you which were these reasons :Frequently, I use some applications which are built with React Native such as Booking, Airbnb, Facebook and Instagram.
  • Their animations, performance and UI are almost native and It is difficult to feel and see difference between Android Native and React application.Another thing I saw was that big companies are starting implement and get involved on React Native.
  • But I could not say the same of React Native here is an example.I made a retrospective about all applications I have made so far in order to found which of them could not be built on React Native.
  • Common features I am talking about List, Sign in, Social Logins, Video player, Audio player, Image render, Forms, Tabs, Details views, Navigation and Animations.Write one and run everywhere, it is well know that if you write a React Native you can run on Android and iOS.
  • It’s also easy to build part of your app in React Native, and part of your app using native code directly — that’s how the Facebook app works.Sooner or later as Android Developer you will have to learn Kotlin.In conclusion, React Native is a framework cross-platform that has been well built and…

I have been an Android Developer for 4 years. During this time I have had the opportunity to development several Android applications. But since 2 months ago I started coding a new application called…
Continue reading “Why I decided to move from Android to React Native – CloudBoost”

The secret to being a top developer is building things! Here’s a list of fun apps to build!

  • Here’s a list of fun apps to build!You can only become a great developer by putting the effort in.
  • Keep it conflict free, use whatever you want!Project #1: Trello CloneTrello clone by Indrek Lasn — Demo LinkWhat you will learn from building a trello clone:RoutingDrag and dropCreating new objects (boards, lists, cards)Handling inputs and validationClient side path: How to use local storage, saving data to the local storage, reading data from the local…
  • What you will learn:Creating users, managing users,Interacting with a database — creating, reading, editing, deleting users.Input validation and how to work with formsProject #3: Cryptocurrency tracker (native mobile app)Github repositoryHAS to be a native app — Swift, Objective-C, React Native, Java, Kotlin allowed.
  • 😊What you will learn:How native apps work.Fetching data from an API.How native layouts work.How to work with mobile simulators.Use this API.
  • Post in comments if you find a better one.In case you’re interested in how this was built, I wrote a tutorial for it.Project #4: Setup your very own webpack config from scratchWell, technically this is not an app but it’s still extremely useful to understand how webpack works under the hood….

You can only become a great developer by putting the effort in. Imagine for a moment — You can’t become fit physically by reading a lot about fitness. You actually need to go to the gym and put the…
Continue reading “The secret to being a top developer is building things! Here’s a list of fun apps to build!”

Introducing React Native Android Fragment – In The Hudl – Medium

  • So today we are announcing our first open source project for React Native at Hudl.React Native Android Fragment: Native Android Fragment does exactly what its name implies.
  • It helps to facilitate the development of a React Native application, for a pre-existing Android application that relies on the framework’s Fragment class.
  • It can be downloaded via jitpack and its versioning will attempt to always follow that of React Native’s major.minor versions.Our Android app originated around 2013 when Fragments were the Android standard and we’ve stuck with them ever since.
  • For anyone else that has tried to use React Native, you may also realize that support for Fragments is non-existent.
  • We hope this library, although small, may help others to get started quickly into the React Native ecosystem.

React Native Android Fragment does exactly what it’s name implies. It helps to facilitate the development of a React Native application, for a pre-existing Android application that relies on the frame
Continue reading “Introducing React Native Android Fragment – In The Hudl – Medium”

React to async/await – Alexander Lee – Medium

React to async/await #reactjs #es7

  • For the examples below, I will show I would normally approach each problem using Promises followed by the async await method.ActionsIn this example, this is how I would typically approach creating a new user via promises.Promise approachexport default function createUser(params) { const request = axios.post(‘http://www…, params); return (dispatch) = request function onSuccess(success) { dispatch({ type: CREATE_USER, payload: success }); return success; } function onError(error) { dispatch({ type: ERROR_GENERATED, error }); return error; } .
  • async/await approachexport default function createUser(params) { return async dispatch = { function onSuccess(success) { dispatch({ type: CREATE_USER, payload: success }); return success; } function onError(error) { dispatch({ type: ERROR_GENERATED, error }); return error; } try { const success = await axios.post(‘http://www…, params); return onSuccess(success); } catch (error) { return onError(error); } }}I added the async prior to the dispatch andawait in front of axios.post .
  • Promise approachimport React, { Component } from ‘react’;export default class userForm extends Component { constructor(props) { super(props); this.onSubmit = this.onSubmit.bind(this); } onSubmit(e) { e.preventDefault(); let formInput = this.refs.createUser; .
  • etc }, (error) = { // Do something with the error }); } render() { return ( form onSubmit={this.onSubmit} input placeholder=”current user” ref=”createUser” / buttonSubmit/button /form ); }}After a form is submitted via click and this.props.createUser,we are returned a promise.
  • Lets see how we can do it using the async/await method.async/await approachimport React, { Component } from ‘react’;export default class userForm extends Component { constructor(props) { super(props); this.onSubmit = this.onSubmit.bind(this); } async onSubmit(e) { e.preventDefault(); let formInput = this.refs.createUser; try { const response = await // do something with response } catch(error) { // do something with error } } render() { return ( form onSubmit={this.onSubmit} input placeholder=”current user” ref=”createUser” / buttonSubmit/button /form ); }}Like our action functions, the async/await approach in our components allows our asynchronous code to look synchronous.

I got curious this past weekend about javascript’s ES7 async/await. After reading a couple of blog posts I got the basic idea of how it works and why it’s gotten so much chatter. Long story short, it…
Continue reading “React to async/await – Alexander Lee – Medium”

rxjs-diagrams

  • The input values are converted to an observables and then transformed to an output using the transform prop.
  • Having multiple input streams is as simple as passing multiple value arrays and accepting them in your transform function.
  • The common three values that describe your input are: emissions, end, and completion.
  • (Example: )

    Completion is the time value when your observable completes.

  • More information on Schedulers here : Here you can pass an array of emissions (described above) or an array of an array of emissions, in case you want multiple input observables.

React components for visualising RxJS observables and operators
Continue reading “rxjs-diagrams”

Facebook’s React JavaScript library faces a new challenger

#Facebook's #ReactJS #Library Faces A New Challenger  via @infoworld #javascript #devops

  • A new rival has emerged to take on Facebook’s React JavaScript library for building UIs: Inferno, designed to be a lightweight and “blazing fast React-like JavaScript library” for building modern interfaces.
  • “Inferno is considerably faster than React,” says the project’s web page.
  • The goal with Inferno is to provide all the benefits of React, plus other features for people already familiar with the React ecosystem, including lifecycle events on functional components, server-side render streams, better real-world performance, lower memory consumption, and faster parse/load times, according to the project’s GitHub repo.
  • “Furthermore, Inferno allows people to switch their existing React projects to Inferno in a few lines of code using inferno-compat.”
  • In developing Inferno, builders were seeking a UI library that could improve experience, battery, memory usage, and performance on mobile devices.

The small, lightweight Inferno library offers a major speed boost as well as server-side render streams, better real-world performance, and lower memory consumption
Continue reading “Facebook’s React JavaScript library faces a new challenger”

Survey

You know you want to answer this one question:



#JavaScript #NodeJS #angular2 #reactjs

  • We are a team of software engineers whose goal is to enhance your business through software.
  • Our products are designed for any size companies willing to optimize their performance.
  • Try the open source website builder .
  • Space and Sun Software, LLC
  • Logo of Space and Sun Software, LLC

We are a team of software engineers whose goal is to enhance your business through software. If you have a problem, we have a solution.
Continue reading “Survey”