In this tutorial we will setup react native web app locally and deploy on Render.Before we start with the react-native-web setup, I assume that you have installed Node.js, Yarn and react-native-cli on your machine.1. Setup React Native App with TypescriptTo create react native app you need to run following commandreact-native init ReactNativeWebApp This command will create react native app and your app directory will look like as shown in the following image (image 1.1)image 1.1: Project rootTo add typescript to our app first we need to install react-native-typescript-transformeryarn add --dev react-native-typescript-transformer typescript Then create
While performing concurrent operations, a database must ensure data integrity. ACID compliant relational database ensures this data integrity through its locking mechanism.ACID = Atomicity, Consistency, Isolation, DurabilityLocks can be at the database, table, page, or row level. Here is a beginner's guide to database locking in PostgreSQL.In this article, let's see how Rails provides a mechanism for optimistic locking on ActiveRecord models. However, before we proceed, let us first understand the basics of optimistic and pessimistic locking.What is optimistic locking?Let's take an example of two admin users, Mohan and Ritesh, managing the product inventory in their e-commerce
We recently created a static app using Next.js, React and Netlify. Everything was fine until we stumbled upon 404 error for invalid routes.This page indicates that we do not have any page defined for the route we entered. So as a fallback, Netlify redirects the user to its default 404.html page.Overriding Netlify's default 404.htmlSo you might be wondering if there was a way we could redirect the user to our custom 404 error page? After reading Netlify docs, we see that this can be done by creating a custom 404.html page in our build
This blog illustrates how we can easily setup a ruby on rails application with ReactJs as a front-end framework
Why does it matter to not send an email during development on local? At times, while doing development we tend to send an email intentionally or unintentionally to verify the email functionality for a specific feature which intern could lead to getting bombarded with testing emails which is of no use. Then it could be possible that the developer needed to reply on the same email saying, “Please ignore the last mail as it was by mistakenly sent during testing on local” The situation still could be handled with peace when the victim is the colleague of yours What if
Developing Slack Bot in Elixir Phoenix.
For the past few months at Kiprosh, we've done versions upgrade of multiple mid to large scale Ruby on Rails applications. One of them was running Rails version 3.2.22. That's where we found out that, we need to make a lot of changes in our codebase to run our application on version 4.0. Hence, we thought to write this blog post to share our insights and recommended strategies for upgrading such mid to large Rails applications.upgrading Ruby on RailsRails guides provide us a brief information on how to upgrade the Rails app, but we need to
Recently, our organization planned to migrate an internal application web API to Nodejs web API. We have everything to work on node app, but we were lacking a console where we can run queries and examine results to implement them in our controller or vice-versa.fig 1. Nodejs consoleWhat we have in Ruby on Rails frameworkrails_app $ rails c irb(main):005:0> User.first User Load (0.7ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1 => #<User id: 1, email: "firstname.lastname@example.org"
Emoji has become an essential part of communication in our digital lives. Hence, as developers, our applications should provide first-class support to them. In this blog post, we will explore how to store Emoji's in MySQL database.In one of our internal Ruby on Rails web application using MySQL database, we were facing an issue whenever a user tried to insert an emoji in the text of an article. The "save" functionality in UI ran infinitely (ajax) and logs were reporting following errors:ActiveRecord::StatementInvalid (Mysql2::Error: Incorrect string value: '\xF0\x9F\x98\x8A ...' for column 'content' at