Alfie Mellor

Alfie Mellor


How to create the same App in React and Vue?

#reactjs #vue-js #javascript #web-development

What is GEEK

Buddha Community

John David


I created the exact same app in React and Vue (Part 1: Here are the differences)

Having used Vue at work, I had a fairly solid understanding of it. I was, however, curious to know what the grass was like on the other side of the fence — the grass in this scenario being React.

I’d read the React docs and watched a few tutorial videos and, while they were great and all, what I really wanted to know was how different React was from Vue. By “different”, I didn’t mean things such as whether they both had virtual DOMS or how they went about rendering pages. I wanted someone to take the time to explain the code! I wanted to find an article that took the time to explain this so that someone new to either Vue or React (or Web Development as a whole) could gain a better understanding of the differences between the two.

Unfortunately, I couldn’t find anything that tackled this. So I came to the realisation that I would have to go ahead and build this myself in order to see the similarities and differences. In doing so, I thought I’d document the whole process so that an article on this will finally exist.

Who wore it better?

I decided to try and build a fairly standard To Do App that allows a user to add and delete items from the list. Both apps were built using the default CLIs (create-react-app for React, and vue-cli for Vue). CLI stands for Command Line Interface by the way. 🤓

Anyway, this intro is already longer than I’d anticipated. So let’s start by having a quick look at how the two apps look:

Vue vs React: The Irresistible Force meets The Immovable Object

The CSS code for both apps are exactly the same, but there are differences in where these are located. With that in mind, let’s next have a look at the file structure of both apps:

Who wore it better?

You’ll see that their structures are almost identical as well. The only difference here is that the React app has three CSS files, whereas the Vue app doesn’t have any. The reason for this is because, in create-react-app, a React component will have an accompanying file to hold its styles, whereas Vue CLI adopts an all encompassing approach, where the styles are declared inside the actual component file.

Ultimately, they both achieve the same thing, and there is nothing to say that you can’t go ahead and structure your CSS differently in React or Vue. It really comes down to personal preference - you’ll hear plenty of discussion from the dev community over how CSS should be structured. For now, we’ll just follow the structure laid out in both CLIs.

But before we go any further, let’s take a quick look at what a typical Vue and React component look like:

Vue on the left. React on the right

Now that’s out of the way, let’s get into the nitty gritty detail!

How do we mutate data?

But first, what do we even mean by “mutate data”? Sounds a bit technical doesn’t it? It basically just means changing the data that we have stored. So if we wanted to change the value of a person’s name from John to Mark, we would be ‘mutating the data’. So this is where a key difference between React and Vue lies. While Vue essentially creates a data object, where data can freely be updated, React creates a state object, where a little more legwork is required to carry out updates. Now React implements the extra legwork with good reason, and we’ll get into that in a little bit. But first, let’s take a look at the data object from Vue and the state object from React:

Vue data object on the left. React state object on the right.

So you can see that we have passed the same data into both, but they’re simply labelled differently. So passing initial data into our components is very, very similar. But as we’ve mentioned, how we go about changing this data differs between both frameworks.

Let’s say that we have a data element called name: ‘Sunil’.

In Vue, we reference this by calling We can also go about updating this by calling = ‘John’. This would change my name to John. I’m not sure how I feel about being called John, but hey ho, things happen! 😅

In React, we would reference the same piece of data by calling Now the key difference here is that we cannot simply write = ‘John’, because React has restrictions in place to prevent this kind of easy, care-free mutation-making. So in React, we would write something along the lines of this.setState({name: ‘John’}).

While this essentially does the same thing as we achieved in Vue, the extra bit of writing is there because Vue essentially combines its own version of setState by default whenever a piece of data gets updated. So in short, React requires setState and then the updated data inside of it, whereas Vue makes an assumption that you’d want to do this if you were updating values inside the data object. So Why does React even bother with this, and why is setState even needed? Let’s hand this over to Revanth Kumar for an explanation:

“This is because React wants to re-run certain life cycle hooks, [such as] componentWillReceiveProps, shouldComponentUpdate, componentWillUpdate, render, componentDidUpdate, whenever state changes. It would know that the state has changed when you call the setState function. If you directly mutated state, React would have to do a lot more work to keep track of changes and what lifecycle hooks to run etc. So to make it simple React uses setState.”
Now that we have mutations out of the way, let’s get into the nitty, gritty by looking at how we would go about adding new items to both of our To Do Apps.

How do we create new To Do Items?


createNewToDoItem = () => {
    this.setState( ({ list, todo }) => ({
      list: [
      todo: ''

How did React do that?

In React, our input field has an attribute on it called value. This value gets automatically updated through the use of a couple of functions that tie together to create something that feels similar to how Vue handles two-way binding (if you’ve never heard of this before, there’s a more detailed explanation in the ‘How did Vue do that’ section after this). We create this by having an additional onChange event listener attached to the input field. Let’s quickly take a look at the input field so that you can see what is going on:

<input type="text" 

The handleInput function is run whenever the value of the input field changes. It updates the todo that sits inside the state object by setting it to whatever is in the input field. This function looks as such:

handleInput = e => {

Now, whenever a user presses the + button on the page to add a new item, the createNewToDoItem function essentially runs this.setState and passes it a function. This function takes two parameters, the first being the entire list array from the state object, the second being the todo (which gets updated by the handleInput function). The function then returns a new object, which contains the entire list from before and then adds todo at the end of it. The entire list is added through the use of a spread operator (Google this if you’ve not seen this before — it’s ES6 syntax).

Finally, we set todo to an empty string, which automatically updates the value inside the input field.


createNewToDoItem() {
            'todo': this.todo
    this.todo = '';

How did Vue do that?

In Vue, our input field has a handle on it called v-model. This allows us to do something known as two-way binding. Let’s just quickly look at our input field, then we’ll explain what is going on:

<input type="text" v-model="todo"/>

V-Model ties the input of this field to a key we have in our data object called toDoItem. When the page loads, we have toDoItem set to an empty string, as such: todo: ‘’. If this had some data already in there, such as todo: ‘add some text here’, our input field would load with add some text here already inside the input field. Anyway, going back to having it as an empty string, whatever text we type inside the input field gets bound to the value for todo. This is effectively two-way binding (the input field can update the data object and the data object can update the input field).

So looking back at the createNewToDoItem() code block from earlier, we see that we push the contents of todo into the list arrayand then update todo to an empty string.

How do we delete from the list?


deleteItem = indexToDelete => {
    this.setState(({ list }) => ({
      list: list.filter((toDo, index) => index !== indexToDelete)

How did React do that?

So whilst the deleteItem function is located inside ToDo.js, I was very easily able to make reference to it inside ToDoItem.js by firstly, passing the deleteItem() function as a prop on as such:

<ToDoItem deleteItem={this.deleteItem.bind(this, key)}/>

This firstly passes the function down to make it accessible to the child. You’ll see here that we’re also binding this as well as passing the key parameter, as key is what the function is going to use to be able to differentiate between which ToDoItem is attempting to delete when clicked. Then, inside the ToDoItem component, we do the following:

<div className=”ToDoItem-Delete” onClick={this.props.deleteItem}>-</div> 

All I had to do to reference a function that sat inside the parent component was to reference this.props.deleteItem.


  this.list = this.list.filter(item => item !== todo);

How did Vue do that?

A slightly different approach is required in Vue. We essentially have to do three things here:

Firstly, on the element we want to call the function:

<div class=”ToDoItem-Delete” @click=”deleteItem(todo)”>-</div>

Then we have to create an emit function as a method inside the child component (in this case, ToDoItem.vue), which looks like this:

deleteItem(todo) {
    this.$emit('delete', todo)

Along with this, you’ll notice that we actually reference a function when we add ToDoItem.vue inside of ToDo.vue:

<ToDoItem v-for="todo in list" 
          @delete="onDeleteItem" // <-- this :)
          :key="" />

This is what is known as a custom event-listener. It listens out for any occasion where an emit is triggered with the string of ‘delete’. If it hears this, it triggers a function called onDeleteItem. This function sits inside of ToDo.vue, rather than ToDoItem.vue. This function, as listed earlier, simply filters the todo array insidethe data object to remove the item that was clicked on.

It’s also worth noting here that in the Vue example, I could have simply written the $emit part inside of the @click listener, as such:

<div class=”ToDoItem-Delete” @click=”$emit(‘delete’, todo)”>-</div> 

This would have reduced the number of steps down from 3 to 2, and this is simply down to personal preference.

In short, child components in React will have access to parent functions via this.props (providing you are passing props down, which is fairly standard practice and you’ll come across this loads of times in other React examples), whilst in Vue, you have to emit events from the child that will usually be collected inside the parent component.

How do we pass event listeners?


Event listeners for simple things such as click events are straight forward. Here is an example of how we created a click event for a button that creates a new ToDo item:

<button className=”ToDo-Add” onClick={this.createNewToDoItem}>+</div>.

Super easy here and pretty much looks like how we would handle an in-line onClick with vanilla JS. As mentioned in the Vue section, it took a little bit longer to set up an event listener to handle whenever the enter button was pressed. This essentially required an onKeyPress event to be handled by the input tag, as such:

<input type=”text” onKeyPress={this.handleKeyPress}/>.

This function essentially triggered the createNewToDoItem function whenever it recognised that the ‘enter’ key had been pressed, as such:

handleKeyPress = (e) => {

if (e.key === ‘Enter’) {





In Vue it is super straight-forward. We simply use the @ symbol, and then the type of event-listener we want to do. So for example, to add a click event listener, we could write the following:

<button class=”ToDo-Add” @click=”createNewToDoItem()”>+</div> 

Note: @click is actually shorthand for writing v-on:click. The cool thing with Vue event listeners is that there are also a bunch of things that you can chain on to them, such as .once which prevents the event listener from being triggered more than once. There are also a bunch of shortcuts when it comes to writing specific event listeners for handling key strokes. I found that it took quite a bit longer to create an event listener in React to create new ToDo items whenever the enter button was pressed. In Vue, I was able to simply write:

<input type=”text” v-on:keyup.enter=”createNewToDoItem”/>

How do we pass data through to a child component?


In react, we pass props onto the child component at the point where it is created. Such as:

<ToDoItem key={key} item={todo} />

Here we see two props passed to the ToDoItem component. From this point on, we can now reference them in the child component via this.props. So to access the item.todo prop, we simply call this.props.item.


In Vue, we pass props onto the child component at the point where it is created. Such as:

<ToDoItem v-for="todo in list" 
            @delete="onDeleteItem" />

Once this is done, we then pass them into the props array in the child component, as such: props: [ ‘todo’ ]. These can then be referenced in the child by their name — so in our case, ‘todo’.

How do we emit data back to a parent component?


We firstly pass the function down to the child component by referencing it as a prop in the place where we call the child component. We then add the call to function on the child by whatever means, such as an onClick, by referencing this.props.whateverTheFunctionIsCalled. This will then trigger the function that sits in the parent component. We can see an example of this entire process in the section ‘How do we delete from the list’.


In our child component, we simply write a function that emits a value back to the parent function. In our parent component, we write a function that listens for when that value is emitted, which can then trigger a function call. We can see an example of this entire process in the section ‘How do we delete from the list’.

**And there we have it! **🎉

We’ve looked at how we add, remove and change data, pass data in the form of props from parent to child, and send data from the child to the parent in the form of event listeners. There are, of course, lots of other little differences and quirks between React and Vue, but hopefully the contents of this article has helped to serve as a bit of a foundation for understanding how both frameworks handle stuff 🤓










_If you are interested in making this article more accessible by translating into another language, please feel free to do so _— let me know if you do so that I can add a link to it on this page. 😄

Github links to both apps:

Vue ToDo:

React ToDo:

I created the same app in React and Vue (Part 2: Angular)

After creating the same app in React and Vue, it’s only right that we throw Angular into the mix!

I use Angular at work every day, but in the JavaScript world one can’t help but hear about all the other frameworks out there. I also love comparing apples to apples! So when I saw Sunil Sandhu’s article on React vs Vue, I had to reach out! So here we are, React vs Vue vs Angular!

How do the apps look all together?

Player 3 Has Entered The Game

Just like in Part 1 the css is nearly identical to the other two, except for where they are located.

This Angular app is generated by the Angular CLI (Command Line Interface). Since Angular is frequently shortened to ‘ng’, the command to make this app was ng generate ng-todo .

Compared to Vue and React, Angular has a ton of files. One big reason for this is that while Vue puts everything for one component into one file, and React breaks out the CSS into its own file, Angular puts the css in one file, html in another, and the component code in another. While we can put all these into one file, it’s considered best practice to keep them separate.

Another reason for all the files is that Angular uses TypeScript. TypeScript is “a superset of JavaScript which provides optional static typing, classes and interfaces”. Lets unpack that a little bit.

TypeScript is really just adding a bunch of stuff on top of JavaScript. If we write a line of JavaScript in our TypeScript code, it will work just fine. What TypeScript lets you do is easily make classes, and enforce their usage.

In our project, we make a ToDo class:

export class ToDo {

  constructor(item: string) {
    this.Item = item;

  Item: string;

This class doesn’t do a whole lot by itself. Where the power comes in is that we can write functions that require a ToDo, and the TypeScript compiler will yell at us if we try and give it anything else.

For Example:

function PrintToDo(myToDo: ToDo) { //the argument is of type ToDo


//this will generate a compiler error
this.PrintToDo("not a ToDo type")

//this will not
this.PrintToDo(new ToDo("a real ToDo"))

Of course we can do this with any type we want, not just classes:

function PrintString(myString: string) {


//this will generate a compiler error
this.PrintToDo(new ToDo("not a string type"))

//this will not
this.PrintToDo("A string!")

TypeScript is just JavaScript, except it will throw type errors sometimes and prevent silly mistakes that would become runtime errors in just JavaScript.

As an application becomes more complicated, classes like this really come in handy! They serve as a good model for a real life thing, like a Product, Job or Person. In the Angular world, we refer to them as Models.

How do we create new ToDos?

Here’s our ToDoComponent:

ToDoComponent (Full Code)

Most what’s going on in this component has to do with styling and the input form. We’ll get to those in a bit, so let’s focus in on the ToDo list itself

ToDoComponent (Abbreviated)

When we get down to it, our list component is just a list of ToDos! ngFor can take our list and display each item, just like a foreach would. The big difference here is that Angular will handle updating for us! When we get some valid input, all we need to do is pass the string into a new ToDo object, and add it to our list. Angular takes care of the rest!

this.ToDos = this.ToDos.concat(new ToDo(this.Input));

That’s it! We also want to be able to make sure the user isn’t submitting an empty ToDo, so how do we prevent that?

Angular Form Validation

Instead of checking for an enter keypress, or checking the string content ourself so that we can throw an error, we can use Angular Forms to do that for us. If you look at the full ToDoComponent, we declare a form element,

<form (ngSubmit)="addItem()" #todoForm="ngForm">

That ngSubmit binding will trigger either when the submit button is pressed, or the user presses enter! It can also only be triggered when the form is in a valid state.

An ngForm also creates a component member variable for each input in a form, in this case called name. We can check what state that input is in, and show errors or other helpful messages depending. In this case we use valid, pristine, and we also keep track ourselves of wether or not the form has been submitted before.

Fun fact, we can also write custom validators for Angular! We don’t need them here, but we could have a form that knows how a phone number should be formatted, and do all the validation for us! Neat, right?

That takes care of our list, but what about actually displaying the ToDo?

Here’s our ToDo Item component:

Our ToDo Item Component

How do we mutate data?

In Angular, all we need to do to display some data is two things:

  1. Have a member in our component, in this case ToDo
  2. Reference it in the template with curly braces {{ToDo.Item}}

And that’s it! When we change ToDo.Item at all, Angular will update the view for us. React doesn’t really provide those hooks, because calling setState is going to re-render the component for us anyway.

Communicating with Components

Since this component is only concerned with displaying a single ToDo, the ToDoComponent needs to be able to give the ToDo Item component a ToDo to display! We also need to be able to tell ToDoComponent that the user has clicked the ‘delete’ button. Angular accomplishes this with ‘Inputs’ and ‘Outputs’

Inputs are very simple, they can be any type we want, and will be bound for us! In this component we just have a ToDo as an input. We tell Angular a particular member is an input by putting the @Input() decorator in front it.

@Input() ToDo: ToDo = new ToDo(""); 

Then our parent component just has to pass the ToDoItem component a ToDo like this:

<ToDoItem [ToDo]=”ToDo”></ToDoItem>

Then we just use a binding to display our ToDo!

Outputs are a little different. An Output isn’t just some data, it’s also an event to trigger whatever is watching for that output. Angular Inputs can be any type (like a string), but Outputs must by of type EventEmitter. EventEmitters emit a value though, which can be of any type we want! So if we wanted to output a string we would just create a decorated member like this:

@Output() Example: EventEmitter<string> = new EventEmitter();

And a parent component can subscribe to the event like this:

<ExampleComponent (Example)="exampleHandler($event)"></ExampleComponent>

Now that we’re armed with the knowledge of outputs, how do we delete a ToDo?

Deleting a ToDo

We don’t need to pass anything up from our ToDoItem component, we just need to trigger an event. Typescript needs to know what type our output is, but since we don’t care, we just make it any, so our Output looks like this:

@Output() Deleted: EventEmitter<any> = new EventEmitter();

We still need to trigger this event within ToDoItem. We’ve got a nicely formatted div that looks like a button form Part 1, we just need to hook a function up to the click event.

<div class="ToDoItem-Delete" (click)="deleteItem()">-</div>```

Then `deleteItem` calls `.emit()` on `Deleted`:

deleteItem() {



and Angular will pass the event up to ToDoComponent.

Back in our ToDoComponent, we’ve bound the `deleteItem` function to our ToDoItem component. We also pass it the index of the current ToDo, so we know which one to delete.

Then all we need to do is remove the ToDo at that index, and Angular will update the display.

deleteItem(i: number) {
this.ToDos.splice(i, 1);

There we go, one ToDo list application!

Even a tiny Angular app has a lot more going on than a React or Vue app. The really nice thing about Angular though is that most of the functionality you need is within Angular itself. Angular includes page routing, protecting access to pages, http calls, module lazy loading, and a whole lot more. A heavyweight framework has a big learning curve. However, the upside is that I rarely have to go outside Angular to find a solution for what I need.

Thanks for reading!

### Learn More

☞ [Vue JS 2 - The Complete Guide (incl. Vue Router & Vuex)]( "Vue JS 2 - The Complete Guide (incl. Vue Router & Vuex)")

 ☞ [Nuxt.js - Vue.js on Steroids]( "Nuxt.js - Vue.js on Steroids")

 ☞ [Build Web Apps with Vue JS 2 & Firebase]( "Build Web Apps with Vue JS 2 & Firebase")

 ☞ [React - The Complete Guide (incl Hooks, React Router, Redux)]( "React - The Complete Guide (incl Hooks, React Router, Redux)")

 ☞ [Modern React with Redux [2019 Update]]( "Modern React with Redux [2019 Update]")

 ☞ [Comparing the React and Vue Ecosystems with a Real-World SPA]( "Comparing the React and Vue Ecosystems with a Real-World SPA")

 ☞ [Why use a framework like Angular, React & Vue?]( "Why use a framework like Angular, React & Vue?")

 ☞ [Vue.js and D3: A Chart Waiting To Happen]( "Vue.js and D3: A Chart Waiting To Happen")

 ☞ [Build a Progressive Web App In VueJs]( "Build a Progressive Web App In VueJs")

 ☞ [React vs Angular: An In-depth Comparison]( "React vs Angular: An In-depth Comparison")

 ☞ [Build Progressive Web Apps with React]( "Build Progressive Web Apps with React")

*Originally published by Sam Borick at *[**]( "**")
Autumn  Blick

Autumn Blick


How native is React Native? | React Native vs Native App Development

If you are undertaking a mobile app development for your start-up or enterprise, you are likely wondering whether to use React Native. As a popular development framework, React Native helps you to develop near-native mobile apps. However, you are probably also wondering how close you can get to a native app by using React Native. How native is React Native?

In the article, we discuss the similarities between native mobile development and development using React Native. We also touch upon where they differ and how to bridge the gaps. Read on.

A brief introduction to React Native

Let’s briefly set the context first. We will briefly touch upon what React Native is and how it differs from earlier hybrid frameworks.

React Native is a popular JavaScript framework that Facebook has created. You can use this open-source framework to code natively rendering Android and iOS mobile apps. You can use it to develop web apps too.

Facebook has developed React Native based on React, its JavaScript library. The first release of React Native came in March 2015. At the time of writing this article, the latest stable release of React Native is 0.62.0, and it was released in March 2020.

Although relatively new, React Native has acquired a high degree of popularity. The “Stack Overflow Developer Survey 2019” report identifies it as the 8th most loved framework. Facebook, Walmart, and Bloomberg are some of the top companies that use React Native.

The popularity of React Native comes from its advantages. Some of its advantages are as follows:

  • Performance: It delivers optimal performance.
  • Cross-platform development: You can develop both Android and iOS apps with it. The reuse of code expedites development and reduces costs.
  • UI design: React Native enables you to design simple and responsive UI for your mobile app.
  • 3rd party plugins: This framework supports 3rd party plugins.
  • Developer community: A vibrant community of developers support React Native.

Why React Native is fundamentally different from earlier hybrid frameworks

Are you wondering whether React Native is just another of those hybrid frameworks like Ionic or Cordova? It’s not! React Native is fundamentally different from these earlier hybrid frameworks.

React Native is very close to native. Consider the following aspects as described on the React Native website:

  • Access to many native platforms features: The primitives of React Native render to native platform UI. This means that your React Native app will use many native platform APIs as native apps would do.
  • Near-native user experience: React Native provides several native components, and these are platform agnostic.
  • The ease of accessing native APIs: React Native uses a declarative UI paradigm. This enables React Native to interact easily with native platform APIs since React Native wraps existing native code.

Due to these factors, React Native offers many more advantages compared to those earlier hybrid frameworks. We now review them.

#android app #frontend #ios app #mobile app development #benefits of react native #is react native good for mobile app development #native vs #pros and cons of react native #react mobile development #react native development #react native experience #react native framework #react native ios vs android #react native pros and cons #react native vs android #react native vs native #react native vs native performance #react vs native #why react native #why use react native

Easter  Deckow

Easter Deckow


PyTumblr: A Python Tumblr API v2 Client



Install via pip:

$ pip install pytumblr

Install from source:

$ git clone
$ cd pytumblr
$ python install


Create a client

A pytumblr.TumblrRestClient is the object you'll make all of your calls to the Tumblr API through. Creating one is this easy:

client = pytumblr.TumblrRestClient(
) # Grabs the current user information

Two easy ways to get your credentials to are:

  1. The built-in tool (if you already have a consumer key & secret)
  2. The Tumblr API console at
  3. Get sample login code at

Supported Methods

User Methods # get information about the authenticating user
client.dashboard() # get the dashboard for the authenticating user
client.likes() # get the likes for the authenticating user
client.following() # get the blogs followed by the authenticating user

client.follow('') # follow a blog
client.unfollow('') # unfollow a blog, reblogkey) # like a post
client.unlike(id, reblogkey) # unlike a post

Blog Methods

client.blog_info(blogName) # get information about a blog
client.posts(blogName, **params) # get posts for a blog
client.avatar(blogName) # get the avatar for a blog
client.blog_likes(blogName) # get the likes on a blog
client.followers(blogName) # get the followers of a blog
client.blog_following(blogName) # get the publicly exposed blogs that [blogName] follows
client.queue(blogName) # get the queue for a given blog
client.submission(blogName) # get the submissions for a given blog

Post Methods

Creating posts

PyTumblr lets you create all of the various types that Tumblr supports. When using these types there are a few defaults that are able to be used with any post type.

The default supported types are described below.

  • state - a string, the state of the post. Supported types are published, draft, queue, private
  • tags - a list, a list of strings that you want tagged on the post. eg: ["testing", "magic", "1"]
  • tweet - a string, the string of the customized tweet you want. eg: "Man I love my mega awesome post!"
  • date - a string, the customized GMT that you want
  • format - a string, the format that your post is in. Support types are html or markdown
  • slug - a string, the slug for the url of the post you want

We'll show examples throughout of these default examples while showcasing all the specific post types.

Creating a photo post

Creating a photo post supports a bunch of different options plus the described default options * caption - a string, the user supplied caption * link - a string, the "click-through" url for the photo * source - a string, the url for the photo you want to use (use this or the data parameter) * data - a list or string, a list of filepaths or a single file path for multipart file upload

#Creates a photo post using a source URL
client.create_photo(blogName, state="published", tags=["testing", "ok"],

#Creates a photo post using a local filepath
client.create_photo(blogName, state="queue", tags=["testing", "ok"],
                    tweet="Woah this is an incredible sweet post [URL]",

#Creates a photoset post using several local filepaths
client.create_photo(blogName, state="draft", tags=["jb is cool"], format="markdown",
                    data=["/Users/johnb/path/to/my/image.jpg", "/Users/johnb/Pictures/kittens.jpg"],
                    caption="## Mega sweet kittens")

Creating a text post

Creating a text post supports the same options as default and just a two other parameters * title - a string, the optional title for the post. Supports markdown or html * body - a string, the body of the of the post. Supports markdown or html

#Creating a text post
client.create_text(blogName, state="published", slug="testing-text-posts", title="Testing", body="testing1 2 3 4")

Creating a quote post

Creating a quote post supports the same options as default and two other parameter * quote - a string, the full text of the qote. Supports markdown or html * source - a string, the cited source. HTML supported

#Creating a quote post
client.create_quote(blogName, state="queue", quote="I am the Walrus", source="Ringo")

Creating a link post

  • title - a string, the title of post that you want. Supports HTML entities.
  • url - a string, the url that you want to create a link post for.
  • description - a string, the desciption of the link that you have
#Create a link post
client.create_link(blogName, title="I like to search things, you should too.", url="",
                   description="Search is pretty cool when a duck does it.")

Creating a chat post

Creating a chat post supports the same options as default and two other parameters * title - a string, the title of the chat post * conversation - a string, the text of the conversation/chat, with diablog labels (no html)

#Create a chat post
chat = """John: Testing can be fun!
Renee: Testing is tedious and so are you.
John: Aw.
client.create_chat(blogName, title="Renee just doesn't understand.", conversation=chat, tags=["renee", "testing"])

Creating an audio post

Creating an audio post allows for all default options and a has 3 other parameters. The only thing to keep in mind while dealing with audio posts is to make sure that you use the external_url parameter or data. You cannot use both at the same time. * caption - a string, the caption for your post * external_url - a string, the url of the site that hosts the audio file * data - a string, the filepath of the audio file you want to upload to Tumblr

#Creating an audio file
client.create_audio(blogName, caption="Rock out.", data="/Users/johnb/Music/my/new/sweet/album.mp3")

#lets use soundcloud!
client.create_audio(blogName, caption="Mega rock out.", external_url="")

Creating a video post

Creating a video post allows for all default options and has three other options. Like the other post types, it has some restrictions. You cannot use the embed and data parameters at the same time. * caption - a string, the caption for your post * embed - a string, the HTML embed code for the video * data - a string, the path of the file you want to upload

#Creating an upload from YouTube
client.create_video(blogName, caption="Jon Snow. Mega ridiculous sword.",

#Creating a video post from local file
client.create_video(blogName, caption="testing", data="/Users/johnb/testing/ok/")

Editing a post

Updating a post requires you knowing what type a post you're updating. You'll be able to supply to the post any of the options given above for updates.

client.edit_post(blogName, id=post_id, type="text", title="Updated")
client.edit_post(blogName, id=post_id, type="photo", data="/Users/johnb/mega/awesome.jpg")

Reblogging a Post

Reblogging a post just requires knowing the post id and the reblog key, which is supplied in the JSON of any post object.

client.reblog(blogName, id=125356, reblog_key="reblog_key")

Deleting a post

Deleting just requires that you own the post and have the post id

client.delete_post(blogName, 123456) # Deletes your post :(

A note on tags: When passing tags, as params, please pass them as a list (not a comma-separated string):

client.create_text(blogName, tags=['hello', 'world'], ...)

Getting notes for a post

In order to get the notes for a post, you need to have the post id and the blog that it is on.

data = client.notes(blogName, id='123456')

The results include a timestamp you can use to make future calls.

data = client.notes(blogName, id='123456', before_timestamp=data["_links"]["next"]["query_params"]["before_timestamp"])

Tagged Methods

# get posts with a given tag
client.tagged(tag, **params)

Using the interactive console

This client comes with a nice interactive console to run you through the OAuth process, grab your tokens (and store them for future use).

You'll need pyyaml installed to run it, but then it's just:

$ python

and away you go! Tokens are stored in ~/.tumblr and are also shared by other Tumblr API clients like the Ruby client.

Running tests

The tests (and coverage reports) are run with nose, like this:

python test

Author: tumblr
Source Code:
License: Apache-2.0 license

#python #api 

Harry Patel

Harry Patel


A Complete Process to Create an App in 2021

It’s 2021, everything is getting replaced by a technologically emerged ecosystem, and mobile apps are one of the best examples to convey this message.

Though bypassing times, the development structure of mobile app has also been changed, but if you still follow the same process to create a mobile app for your business, then you are losing a ton of opportunities by not giving top-notch mobile experience to your users, which your competitors are doing.

You are about to lose potential existing customers you have, so what’s the ideal solution to build a successful mobile app in 2021?

This article will discuss how to build a mobile app in 2021 to help out many small businesses, startups & entrepreneurs by simplifying the mobile app development process for their business.

The first thing is to EVALUATE your mobile app IDEA means how your mobile app will change your target audience’s life and why your mobile app only can be the solution to their problem.

Now you have proposed a solution to a specific audience group, now start to think about the mobile app functionalities, the features would be in it, and simple to understand user interface with impressive UI designs.

From designing to development, everything is covered at this point; now, focus on a prelaunch marketing plan to create hype for your mobile app’s targeted audience, which will help you score initial downloads.

Boom, you are about to cross a particular download to generate a specific revenue through your mobile app.

#create an app in 2021 #process to create an app in 2021 #a complete process to create an app in 2021 #complete process to create an app in 2021 #process to create an app #complete process to create an app

How React Native Is Shaping Mobile App Development

Are you a mobile app developer looking for more efficient tools for your projects? Mobile app development is getting tougher and tougher as the market continues to grow. As a developer, you need to develop Apps which meet the demands of your users. To achieve this, adopt the right tools, like the React Native development framework.

Based on Statista data, the global mobile app market will generate over $935 billion in 2023 from more than $365 billion in 2018. The majority of this amount will come from in-app advertising and paid downloads. To gain a share in the marketplace, companies need to embrace new technologies to provide what consumers are looking for, such as seamless navigation and aesthetic appeal—the React Native development framework makes it all possible.

Table of Contents

  • What is Mobile App Development?
  • What are the Types of Apps?
  • What are the Components of Mobile App Architecture?
  • Things to Consider in Mobile App Development
  • What is React Native?
  • Top Reasons Why React Native is the Future of Mobile App Development
  • Useful Tips on How to Become an Excellent React Native Developer

#mobile-app-development #mobile-apps #react #react-native #android-app-development #app-development #ios-app-development #create-react-native-app

Top 10 React Native App Development Companies in USA

React Native is the most popular dynamic framework that provides the opportunity for Android & iOS users to download and use your product. Finding a good React Native development company is incredibly challenging. Use our list as your go-to resource for React Native app development Companies in USA.

List of Top-Rated React Native Mobile App Development Companies in USA:

  1. AppClues Infotech
  2. WebClues Infotech
  3. AppClues Studio
  4. WebClues Global
  5. Data EximIT
  6. Apptunix
  7. BHW Group
  8. Willow Tree:
  9. MindGrub
  10. Prismetric

A Brief about the company details mentioned below:

1. AppClues Infotech
As a React Native Mobile App Development Company in USA, AppClues Infotech offers user-centered mobile app development for iOS & Android. Since their founding in 2014, their React Native developers create beautiful mobile apps.

They have a robust react native app development team that has high knowledge and excellent strength of developing any type of mobile app. They have successfully delivered 450+ mobile apps as per client requirements and functionalities.

2. WebClues Infotech
WebClues Infotech is the Top-Notch React Native mobile app development company in USA & offering exceptional service worldwide. Since their founding in 2014, they have completed 950+ web & mobile apps projects on time.

They have the best team of developers who has an excellent knowledge of developing the most secure, robust & Powerful React Native Mobile Apps. From start-ups to enterprise organizations, WebClues Infotech provides top-notch React Native App solutions that meet the needs of their clients.

3. AppClues Studio
AppClues Studio is one of the top React Native mobile app development company in USA and offers the best service worldwide at an affordable price. They have a robust & comprehensive team of React Native App developers who has high strength & extensive knowledge of developing any type of mobile apps.

4. WebClues Global
WebClues Global is one of the best React Native Mobile App Development Company in USA. They provide low-cost & fast React Native Development Services and their React Native App Developers have a high capability of serving projects on more than one platform.

Since their founding in 2014, they have successfully delivered 721+ mobile app projects accurately. They offer versatile React Native App development technology solutions to their clients at an affordable price.

5. Data EximIT
Hire expert React Native app developer from top React Native app development company in USA. Data EximIT is providing high-quality and innovative React Native application development services and support for your next projects. The company has been in the market for more than 8 years and has already gained the trust of 553+ clients and completed 1250+ projects around the globe.

They have a large pool of React Native App developers who can create scalable, full-fledged, and appealing mobile apps to meet the highest industry standards.

6. Apptunix
Apptunix is the best React Native App Development Company in the USA. It was established in 2013 and vast experience in developing React Native apps. After developing various successful React Native Mobile Apps, the company believes that this technology helps them incorporate advanced features in mobile apps without influencing the user experience.

7. BHW Group
BHW Group is a Top-Notch React Native Mobile App Development Company in the USA. The company has 13+ years of experience in providing qualitative app development services to clients worldwide. They have a compressive pool of React Native App developers who can create scalable, full-fledged, and creative mobile apps to meet the highest industry standards.

8. Willow Tree:
Willow Tree is the Top-Notch React Native Mobile App Development Company in the USA & offering exceptional React Native service. They have the best team of developers who has an excellent knowledge of developing the most secure, robust & Powerful React Native Mobile Apps. From start-ups to enterprise organizations, Willow Tree has top-notch React Native App solutions that meet the needs of their clients.

9. MindGrub
MindGrub is a leading React Native Mobile App Development Company in the USA. Along with React Native, the company also works on other emerging technologies like robotics, augmented & virtual reality. The Company has excellent strength and the best developers team for any type of React Native mobile apps. They offer versatile React Native App development technology solutions to their clients.

10. Prismetric
Prismetric is the premium React Native Mobile App Development Company in the USA. They provide fast React Native Development Services and their React Native App Developers have a high capability of serving projects on various platforms. They focus on developing customized solutions for specific business requirements. Being a popular name in the React Native development market, Prismetric has accumulated a specialty in offering these services.

#top rated react native app development companies in usa #top 10 react native app development companies in usa #top react native app development companies in usa #react native app development technologies #react native app development #hire top react native app developers in usa