Sheldon  Grant

Sheldon Grant

1614163269

Nx, React & Tailwind CSS  -  Made Simple

Original Post

I am writing this post after doing something that worked and then forgetting what I did. I tried searching for a similar solution to help me recall what I forgot I did and discovered that the info out there is perhaps not the best approach. Essentially these are just some developer notes on an approach to integrating tailwind with my Nx managed workspace with a react app.

Ok, so some context first. I am a fan of Tailwind CSS. Years of fighting with Ant, Material Design, Bootstrap and more have left me with a bad taste for “UI Frameworks” in React. Over the last year I have been tinkering with Tailwind and have come to believe it is the future of UI for web. I will spare you my further opinions on the matter and assume that since you are here reading this you know what I am talking about already.

I am also a recent convert to Nx. Born of the Angular world, Nx is the missing piece I have been hunting for to manage large React projects which involve larger back-ends and the need to separate sections of the app into libraries. Again, since you are hear reading this I will assume you know what Nx is and why its pretty good. Now onto the good stuff…

I created a new Nx workspace with an api and react app. Great, nothing special there. Then I wanted to add in tailwind. There are many ways to pull this off. Assume for the moment that using a CDN link in the html is off the table (I mean who really wants to risk the security issues involved with that — unless of course you are managing your own CDN setup but thats a different story altogether). For my case adding tailwind means having control over the generation of the css.

What I did

Install the dependencies

npm i \
  tailwindcss \
  autoprefixer@9.8.6 \
  postcss \
  postcss-cli \
  postcss-nested -D

I am using autoprefixer@9.8.6 because there are known issues with the latest release at the time of this writing.

#notes #nodejs

What is GEEK

Buddha Community

Nx, React & Tailwind CSS  -  Made Simple
Autumn  Blick

Autumn Blick

1598839687

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

Beth  Nabimanya

Beth Nabimanya

1626409934

5 Reasons to Use Tailwind CSS with React Native

Tailwind CSS is an open-source utility-first CSS framework. It redefines the way you style applications by providing a variety of CSS classes.

Using Tailwind CSS, you can style your applications without a single custom class name or a stylesheet.

Furthermore, I found that it works exceptionally well with mobile applications based on React Native.

So, in this article, I’m going to discuss why Tailwind CSS is the best solution for React Native applications.

  • 1. Customized Packages for Better Integration
  • 2. Small Bundle Size in Production
  • 3. Improves Maintainability
  • 4. Consistent UI and Customizability
  • 5. Can Easily Keep the Application Up-to-Date

#react #tailwind-css #react-native #css #javascript

Aisu  Joesph

Aisu Joesph

1618024175

CSS Alignment Made Simple

CSS is seen as an impediment in web development for many of us. Most of the time it looks like even when you follow the rules and everything seems clear, it still doesn’t work the way you want it to.

Therefore, the purpose of this article is to make some features of CSS much easier to understand.

The thing I want to address now is the alignment of the elements.

Without further ado, here are some of the most common scenarios one might encounter when it comes to this topic and how they can be approached.

#css-center #css-position #css-flexbox #css-center-image-in-a-div #css

Raleigh  Hayes

Raleigh Hayes

1626959340

Building a Dashboard with Cube CSS and React

Hi! Super excited for this video. Cube CSS has completely changed the way I look at CSS. In this video we are building a dashboard using Cube CSS and React. I hope you enjoy.

Timestamps:
0:00 - Intro
2:50 - The App
4:27 - Global CSS
5:53 - Theme Utilities
8:45 - Composition Style Utilities
13:36 - Shared Blocks/Exception
16:26 - Custom Blocks

Useful links:
Github: https://github.com/redhwannacef/youtube-tutorials/tree/master/cube-css-react

#css #react #cube css #cube css and react

Queenie  Davis

Queenie Davis

1625923620

Develop an Appointment App with React and Tailwind CSS

So it’s time for us to create another component. I’d like to create a component that has the information for the dropdown when we click the blue button in our app.

Now I could do that in a separate file like we’ve done with the Search.js component but it’s really a component that’s not going to be used anywhere else and it’s really part of this search function. I could optionally just create some additional code in the search component.

But this is going to be so much code that I like to put it in a separate component by itself. So I’m going to create a const here and I’ll call this drop down and I’ll use the same function notation with arrow functions.

And then we’re going to need a return statement with some additional JSX. that is given below for you.

Notice that I’m using an icon named biCheck here so I need to make sure that I call that. And I need to make sure that I call this dropdown right underneath this button.

Cool now I get the code for the dropdown and I have all these little check boxes that I’ll be programming later on. Now to me it makes sense to keep things together that belong together and not put everything in a separate file otherwise we’ll just be making sub-components and have to dig through them all over your file structure.

#react #javascript #tailwind-css #css