10 more stars till we get to 1k! Star it if you haven’t already 🌟 🎉

  • Run the example app with Expo to see it in action.
  • The source code for the examples are under the /example folder.

GitHub is where people build software. More than 27 million people use GitHub to discover, fork, and contribute to over 80 million projects.
Continue reading “10 more stars till we get to 1k! Star it if you haven’t already 🌟 🎉”

Mern Stack Crud App Using create-react-app & React Redux Part 1.

Mern Stack Crud App Using create-react-app & React Redux Part 1.

☞  

#Reactjs #Redux

  • js – import express from ‘express’; – import path from ‘path’; – import bodyParser from ‘body-parser’; – import logger from ‘morgan’; – import mongoose from ‘mongoose’; – import bb from ‘express-busboy’;// import routes – import todoRoutes from define our app using express – const app = express();// express-busboy to parse…
  • /h2′); – });// start the server – app.listen(port,() = { – console.log(`App Server Listening at ${port}`); – });The above code sets up a express app, with an /api route points to a Let’s create this express from ‘express’;//import controller file – import * as todoController from get an instance of…
  • get(todoController.getTodo) – default router;Create a controller file todo.server.controller.js in a new folder called controllers to handle the CRUD functionality at the mongoose from ‘mongoose’;//import models – import Todo from const getTodos = (req,res) = { – Todo.find().
  • So create a new directory in the express-server folder called models and then create another file in that called mongoose from ‘mongoose’;var Schema = mongoose.Schema({ – createdAt:{ – type: Date, – default: Date.now – }, – fullName: String, – todoText: String – });export default mongoose.model(‘Todo’, Schema);Even though Node.js supports many…
  • js – import express from ‘express’; – import path from ‘path’; – import bodyParser from ‘body-parser’; – import logger from ‘morgan’; – import mongoose from ‘mongoose’; – import SourceMapSupport from ‘source-map-support’;// import routes – import todoRoutes from define our app using express – const app = express();// “*”); – “Origin,…

The MERN (MongoDB, Express, ReactJs, Node.js) stack is arguably the most popular stack for any web application these days. Our application is a basic crud application tutorial that will help you get…
Continue reading “Mern Stack Crud App Using create-react-app & React Redux Part 1.”

Setting up React Project with Parcel zero configuration approach.

Setting up React Project with Parcel zero configuration approach.

☞ 

#Reactjs

  • Setting up React Project with Parcel zero configuration approach.Learn how to configure React with Parcel module bundler in this brief tutorial – Parcel is a new module bundler for Javascript applications.
  • Setting up React with Parcel bundler: HTML and friendsBefore processing any HTML in webpack you must install two dependencies: the HTML plugin and the HTML loader.
  • Setting up React with Parcel bundler: setting up BabelReact components are mostly written in Javascript ES6.
  • As with webpack, Parcel should transform raw React components into a meaningful Javascript bundle.
  • Setting up React with Parcel bundler: wrapping upParcel is a new module bundler for Javascript that promises blazing fast speed and zero configuration bundling.

Parcel is a new module bundler for Javascript applications. It offers faster compilation times and zero configuration bundling. Webpack is a powerful tool. I know, webpack can’t be compared to Gulp…
Continue reading “Setting up React Project with Parcel zero configuration approach.”

Promise-returning setState and forceUpdate by jamiebuilds · Pull Request #10 · reactjs/rfcs · GitHub

  • Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
  • By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement.
  • Already on GitHub?
  • Sign in to your account

[Rendered]
This RFC specifies setState and forceUpdate to return a promise when no callback is provided.
class DataFetcher extends React.Component {
state = {
loading: false,
error: null,
data: null,
};

async componentDidMount() {
await this.setState({ loading: true });
try {
let response = await fetch(this.props.url);
let data = await response.json();
await this.setState({ data, loading: false });
} catch (error) {
await this.setState({ error, loading: false });
}
};

render() {
return this.props.render(this.state);
}
}

Note: This example doesn’t rely so much on setState being applied before continuing. I can come up with a better example if people want it better demonstrated. I figured the data fetching example was easiest to understand.
Continue reading “Promise-returning setState and forceUpdate by jamiebuilds · Pull Request #10 · reactjs/rfcs · GitHub”

A simple React.js on MacOS Setup

  • The node package manager is used to install libraries/frameworks (node packages), such as React, on the command line to your project.
  • That’s why my recommendation would be Visual Studio Code to start developing React applications on MacOS.
  • The installation on a MacOS machine is simple: Navigate to the official Visual Studio Code website and download the recent version of VS Code.
  • That’s your integrated command line in Visual Studio Code to install node packages with NPM or to start/test your project.
  • On the command line (in Visual Studio Code), type the following command to install create-react-app: – – This package allows you to bootstrap React applications with zero-configuration.

A concise step by step guide on how to setup React.js on MacOS. In a few steps, you will install Visual Studio Code, Node.js, NPM, Git, Prettier and create-react-app for building React applications with Mac OS …
Continue reading “A simple React.js on MacOS Setup”

Just the way of teaching @reactjs Workshop #1 starting tomorrow morning @ @ReactAmsterdam

Just the  way of teaching @reactjs

Workshop #1 starting tomorrow morning @ @ReactAmsterdam

  • Learned a lot!
  • Good introduction to the basics of React.
  • I see it as a very good starting point for further React development.
  • It was dynamic, learned a lot, and met new tools.
  • The best part were the interactivity and enthusiasm.

Interactive React and JavaScript workshop for public training, private company training, or conference workshops. The first workshop accompanied by an interactive web app for practical exercises.
Continue reading “Just the way of teaching @reactjs

Workshop #1 starting tomorrow morning @ @ReactAmsterdam”

The History of React.js on a Timeline

The History of #reactjs on a Timeline

  • Moreover, our excellent front-end expert, Miklos Bertalan has started a series of live streams where he shows how to build React apps on a free, locally hosted server – created by another brilliant engineer at Risingstack, Robert Czinege.
  • I have collected the most significant milestones in the history of React, which you’ll be able to see in this timeline below.
  • 2010 – The first signs of React – – 2012 – Something new had started at Facebook – – 2013 – The year of the Big Launch – – React had gradually gained its reputation and started to go through to ‘early majority’ of its potential users.
  • At this point, they needed a new message instead of solely relying on its technical benefits, and it is: how is React stable?
  • This journey has been fun so far, but there is certainly a lot more to learn about React.

The History of React.js on a timeline: 2010-2018.
The most significant milestones of its creation and development over the past 8 years.
Continue reading “The History of React.js on a Timeline”

React links time! ⚛️ Super easy magic-move transitions ⚛️ Virtual DOM explained…

  • Wrap any element (not just images) in a component.
  • Add the same to create a transition between the elements.
  • A transition is made when an component is unmounted and another is mounted not later than 100ms.
  • The transition is made by cloning the unmounted and mounted components, adding them with position and CSS transformed from the source to the target position.

GitHub is where people build software. More than 27 million people use GitHub to discover, fork, and contribute to over 80 million projects.
Continue reading “React links time!

⚛️ Super easy magic-move transitions

⚛️ Virtual DOM explained…”

Set Up A React Project With Parcel: The Zero Configuration App Bundler ― Scotch

Set Up A React Project With Parcel: The Zero Configuration App Bundler

☞ 

#Reactjs

  • One other thing to note about Parcel is that it allows developers to use an index.html file as an entry point as opposed to JS modules.
  • One of the many cool things about Parcel is that, it comes with a development server built in which will automatically rebuild your app as you change files and supports hot module replacement for fast development.
  • “scripts”: { – “start”: “parcel index.html” – }, – This means that, whenever we run the npm start command, we are telling Parcel to start a development server using the index.html file as a entry file.
  • Building for Production – To prepare your app for production with Parcel, all you need to do is run the command parcel build …. Let’s add that to the scripts object in the package.json file.
  • Change output directory – If you’d prefer another directory for Parcel to put the production files in (dist is the default directory), you can specify that by appending –out-dir directory-name at the end of the build key in package.json so it looks like this: – – “scripts”: { – “start”:…

Continue reading “Set Up A React Project With Parcel: The Zero Configuration App Bundler ― Scotch”

React-basic: Description of the conceptual model of React

  • The core premise for React is that UIs are simply a projection of data into a different form of data.
  • My actual mental model of this is that they return the next version of state during an “update” pass.
  • Most UIs are some form of lists that then produce multiple different values for each item in the list.
  • We can move the logic of extracting and passing state to a low-level function that we reuse a lot.
  • We can use the same trick we used for state and pass a memoization cache through the composable function.

GitHub is where people build software. More than 27 million people use GitHub to discover, fork, and contribute to over 80 million projects.
Continue reading “React-basic: Description of the conceptual model of React”