Is One the ultimate React and React Native Framework?

Jack Herrington
14 Oct 202418:02

Summary

TLDRIn this video, the creator reviews the 'One' framework, designed for building full-stack React web and React Native applications seamlessly. The setup is straightforward, leveraging a full-stack starter template that includes essential tools like Tamag UI and Drizzle. Key features include a file-based routing system, versatile components for cross-platform design, and efficient data loading mechanisms. While the framework shows promise with its unified codebase approach, early-stage stability issues and library compatibility concerns remain. The review highlights both pros and cons, emphasizing its potential for rapid development in startups and proof-of-concept projects.

Takeaways

  • ๐Ÿ˜€ The One framework allows developers to build full-stack React web and React Native applications from a single codebase.
  • ๐Ÿ› ๏ธ Setting up an app with One is straightforward; developers can choose between a barebones setup or a full-stack example with essential components.
  • ๐Ÿ“ธ The Tamag UI toolkit is crucial for creating cross-platform UIs that work seamlessly on both web and mobile.
  • ๐Ÿ’พ The framework supports various data storage options, allowing developers to use file-based systems or integrate with PostgreSQL via Docker.
  • ๐ŸŒ One uses file-based routing, where the organization of files and folders defines the app's route structure.
  • ๐Ÿ”„ It supports multiple types of routes, including static routes, server-side rendered (SSR) routes, single-page applications (SPAs), and API routes.
  • ๐Ÿ“ฑ Tamag UI components facilitate responsive layouts, offering XStack and YStack for flexible design across platforms.
  • ๐Ÿ“ฆ Developers can manage platform-specific code through separate files for web and native versions, ensuring tailored functionality.
  • โš ๏ธ One is still in early beta, meaning developers may face stability issues and compatibility challenges with certain libraries.
  • ๐Ÿš€ The framework is praised for its efficiency and potential for rapid prototyping, making it suitable for startups and proof-of-concept projects.

Q & A

  • What is the One framework designed for?

    -The One framework is designed to build full-stack web applications using React and React Native, allowing developers to create both web and mobile apps from a single codebase.

  • How does the setup process for the One framework work?

    -Setting up an app with the One framework is straightforward. You can use the command 'mpx1' to initiate a setup, choosing between a barebone configuration or a full-stack example, which includes necessary tools like TamagUI, Drizzle, and Postgres.

  • What are some key components included in the full-stack starter template?

    -The full-stack starter template includes TamagUI for cross-platform UI components, Drizzle for managing data, Postgres as the database, and biome for linting and tooling.

  • What unique feature does the Zero database API provide?

    -The Zero database API offers real-time capabilities and is currently in private beta. Users interested in exploring it can inquire for early access.

  • What routing mechanism does the One framework utilize?

    -The One framework uses a file-based routing mechanism, where the organization of files and folders in the app directory defines the structure of the routes.

  • What types of routes can be implemented with the One framework?

    -The One framework supports several types of routes, including static routes (SSG), server-side rendered routes (SSR), single-page application routes (SPA), and API routes.

  • How does data loading work in the One framework?

    -Data loading in the One framework is handled through loader functions, which are executed at build time for SSG routes and on each request for SSR routes. This allows dynamic data fetching based on the current context.

  • What is the advantage of using TamagUI for components?

    -TamagUI is beneficial because it provides a comprehensive set of cross-platform components that are themeable and can be used seamlessly across both web and mobile applications.

  • What are the pros and cons of using the One framework?

    -Pros include its capability to create a unified codebase for web and mobile apps, fluid development experience, and flexibility in architectural choices. Cons include its early beta status leading to stability issues and compatibility challenges with certain libraries.

  • What is the significance of the Infinite Red consultancy mentioned in the video?

    -Infinite Red is a well-established React Native consultancy that provides expertise and support in the React Native community, offering resources and services for developers, including help with issues and frameworks.

Outlines

00:00

๐Ÿ› ๏ธ Overview of the One Framework

This part introduces the One framework, highlighting its capability to build both full-stack React web applications and React Native applications seamlessly. The speaker shares their experience of spending a week testing the framework, focusing on a straightforward setup process using MPX1. They recommend starting with a full-stack example for better insights into necessary features, including Tamagoi, Drizzle, PostgreSQL, and biome for tooling. The discussion includes a simplified approach to building a photo application, emphasizing the importance of cross-platform UI and how to effectively manage routing, file organization, and data loading within the app.

05:01

๐Ÿš€ Routing and Features in One Framework

In this section, the speaker delves into the routing capabilities of the One framework, clarifying that it employs a file-based routing system similar to Next.js. Different types of routes are defined, including static routes (SSG), server-side rendered routes (SSR), single-page applications (SPA), and API routes. They explain the organization of routes through file structure and discuss how each route type functions within the application. The speaker also outlines how data loading works, using loader functions to fetch and render data effectively while emphasizing the framework's flexible architecture that supports both web and mobile environments.

10:03

๐Ÿ“ฑ Components and Responsive Layout

This part emphasizes the importance of using the Tamagoi component library within the One framework for building responsive layouts. The speaker details various components that facilitate cross-platform development and provides examples of how to structure code for web and native versions. They discuss the advantages of using layout components, the handling of platform-specific styles, and the ability to set custom breakpoints for responsive design. The section concludes with a focus on the elegant solution for managing native-only code, showcasing the flexibility and convenience of the framework.

15:04

โš–๏ธ Pros and Cons of the One Framework

In the final part, the speaker evaluates the pros and cons of the One framework, noting that while it presents an innovative solution for shared codebases between web and mobile, its stability remains a concern due to being in early beta. They point out the need for library compatibility and the potential for issues requiring patching. On the positive side, the framework's ability to deliver a fluid development experience and avoid architectural constraints is highlighted, making it suitable for rapid development of full web and mobile applications. The speaker concludes by expressing confidence in recommending the framework for startups and proof-of-concept projects.

Mindmap

Keywords

๐Ÿ’กOne Framework

The One Framework is a development tool designed for creating full-stack applications that run on both React web and React Native platforms. It simplifies the development process by allowing developers to use a single codebase for both web and mobile applications. This is highlighted in the script when the presenter discusses the framework's capabilities in delivering a fluid development experience, reducing the complexity of managing separate codebases.

๐Ÿ’กTamagoi

Tamagoi is a cross-platform UI toolkit that is integral to the One Framework. It provides a set of components that ensure a consistent user interface across both web and mobile applications. The presenter emphasizes Tamagoi's role in building user interfaces and mentions that it comes pre-installed with the framework, making it easier for developers to create visually appealing applications that function seamlessly on multiple platforms.

๐Ÿ’กFull Stack

Full stack refers to the complete range of technologies and tools used to build an entire application, encompassing both the front-end (user interface) and back-end (server-side logic and database interactions). In the context of the One Framework, it means that developers can manage everything from user interface design to database management within a single project structure. The script illustrates this by mentioning the use of PostgreSQL and Drizzle for database work within the full-stack setup.

๐Ÿ’กFile-based Routing

File-based routing is a method of organizing application routes based on the structure of the file system, where the folder and file names determine the routes in the application. This approach simplifies route management and makes it easier to visualize the application structure. The presenter compares this to routing methods in other frameworks like Next.js, explaining how the organization of files defines the application's navigation paths.

๐Ÿ’กSSR (Server-Side Rendering)

Server-Side Rendering (SSR) is a technique where the HTML of a web page is generated on the server for each request, rather than being generated on the client side. This can improve performance and SEO. The video script mentions SSR routes in the One Framework, explaining how they allow dynamic content rendering based on user requests, which is crucial for applications that require real-time data updates.

๐Ÿ’กSSG (Static Site Generation)

Static Site Generation (SSG) involves pre-generating the HTML pages at build time, so they can be served directly to the user without the need for server processing. In the video, the presenter notes that the default render mode for the One Framework is set to SSG, ensuring that routes are compiled and cached, which enhances loading speed and reduces server load during user interactions.

๐Ÿ’กAPI Routes

API routes are endpoints within an application that handle requests for data, allowing for interaction with server-side logic. The script explains how the One Framework supports defining API routes, where developers can export functions that correspond to HTTP methods (e.g., POST, GET). This modular approach facilitates data handling within the application, making it easier to manage user actions like uploading files.

๐Ÿ’กResponsive Layout

Responsive layout refers to design techniques that ensure an applicationโ€™s user interface adapts to various screen sizes and orientations, providing an optimal viewing experience across devices. The presenter highlights how the One Framework employs Tamagoi's components to create responsive layouts using flexbox principles, ensuring that web and mobile versions of an application look consistent and functional regardless of device.

๐Ÿ’กCross-platform

Cross-platform development allows applications to run on multiple operating systems or environments without requiring extensive code modifications. The One Framework is designed with cross-platform capabilities, allowing developers to write code once and deploy it across both web and mobile platforms. The script points out that this feature is essential for modern app development, streamlining workflows and improving productivity.

๐Ÿ’กCommunity Support

Community support refers to the assistance and resources available from the developer community surrounding a technology or framework. In the video, the presenter notes the responsive nature of the One Framework's development team, which addresses compatibility issues and library patches promptly. This highlights the importance of community engagement in ensuring the framework's reliability and success, especially during its beta phase.

Highlights

The One Framework allows for building both full-stack React web and React Native applications in a single setup.

The setup process is straightforward, using mpx to initiate an app, with options for barebone or full-stack examples.

The full-stack example includes Tamagui, Drizzle, PostgreSQL, and biome for development tooling.

Tamagui is highlighted as a top-tier cross-platform UI toolkit essential for React web and native applications.

The demo app, a simple photo application, uses file-based storage instead of PostgreSQL for simplicity.

Development involves using Yarn commands to launch the app and access features via a web view or Expo QR code.

The photos app allows users to upload photos, view details, and features a static about page.

Routing is based on a file structure, making it easy to define routes through the organization of files and folders.

Different route types include static, server-side rendered (SSR), single-page application (SPA), and API routes.

Loader functions are used for data fetching during page render, supporting both static and SSR routes.

Components and layouts can be built responsively, leveraging Tamagui's cross-platform capabilities.

Tamagui supports platform-specific styles and responsive design using attributes like `$platform`.

One framework allows for easy switching between web and native components without significant restructuring.

Despite its potential, the framework is in early beta and may present stability issues with certain libraries.

The framework's development team is responsive and proactive in addressing compatibility issues with libraries.

One Framework provides a single codebase for both web and mobile applications, reducing complexity in development.

This framework is recommended for startups needing a quick, full web and native experience.

Transcripts

play00:00

is one the one framework that you need

play00:02

to build a full stack react web

play00:04

application and a react native

play00:06

application all in one go let's find

play00:11

[Music]

play00:15

out so I spent the better part of a week

play00:17

trying out one building apps testing out

play00:20

features and unlike the coding

play00:22

walkthroughs I usually do instead I'm

play00:24

going to give you the kind of review I

play00:25

might do if I was say a principal at a

play00:28

big company looking to try a new

play00:30

framework and then recommend it to my

play00:33

peers and showing off the features and

play00:35

doing then some pros and cons at the end

play00:38

so let's start off with setup it's

play00:40

really easy you use mpx1 to set up an

play00:43

app and your choices are between a

play00:45

barebone setup with or without tomag GOI

play00:48

and a full stack example if you want to

play00:50

try it out I'd go with a full stack

play00:51

example because it's got most of what

play00:54

you're going to need it's got tamagi

play00:56

which is a crossplatform UI toolkit

play00:58

which is also from the same folks behind

play01:01

the one framework itself as well as

play01:03

drizzle and postgress for database work

play01:06

and biome for tooling like linting and

play01:09

all that the tamagi component library is

play01:11

clearly one of the critical pieces here

play01:13

because whatever you choose for the UI

play01:15

you're going to need to have it be

play01:17

crossplatform so it works across both

play01:19

react for web and react native and tomoi

play01:22

is a top tier component system for doing

play01:25

that now for my simple photos

play01:27

application I started with that full

play01:29

stack starter and I I stripped it back

play01:31

so that instead of using postris and

play01:32

drizzle i instead used a file based

play01:35

storage system I did that basically to

play01:37

simplify it for you if you wanted to try

play01:38

out my code to use the postc stuff you

play01:41

follow the instructions in the readme

play01:42

for that full stack app and it goes

play01:44

through how to use Docker compose to

play01:46

bring up a postgress instance if you got

play01:48

doer install it it's pretty easy to do

play01:50

that but I just wanted to go with that

play01:51

file system anyway the one full stack

play01:53

template installs postgress because the

play01:56

postgress database is behind this

play01:58

real-time database API called Z Z

play02:00

they're I think soft partnering with now

play02:03

the documentation on the one site says

play02:04

the zero stuff is really cool but it's

play02:06

also in private beta so if you're

play02:09

interested in that let me know in the

play02:10

comments and I'll reach out and see if

play02:12

they can give me an early look and we'll

play02:13

have a look at it so when it comes to

play02:14

developing on this to install it you're

play02:16

just going to use yarn install and then

play02:18

use yarn Dev that's going to bring up

play02:20

this interactive mode where you use oow

play02:22

in there just type O to BR bring up the

play02:25

web View and then QR to bring up the

play02:28

Expo Q q r code if you're going to look

play02:31

at it in Native now you can just point

play02:33

your phone at that QR code or if you

play02:35

want to do it locally I use the

play02:36

simulator and I bring up Expo in that

play02:38

simulator I type in the URL of the app

play02:41

but instead of using HTTP I use exp

play02:45

instead as the protocol and then I just

play02:47

give it

play02:48

1271 colon 881 all right let's have a

play02:51

quick look at this photos app that I

play02:52

built of course all of the code for that

play02:54

is available to you for free in the link

play02:56

in the description right down below the

play02:58

homepage for both web and mobile shows

play03:00

all the uploaded photos that you upload

play03:02

and then you can click on a photo and go

play03:03

to a detail page on it you can also

play03:06

upload a photo using a file picker on

play03:09

the web or a camera on mobile and

play03:12

there's this static about page so I'm

play03:14

just trying to try out all the different

play03:15

types of routes and uis so let's have a

play03:18

look at the project over in cursor and

play03:20

you can see that all the routes are

play03:21

defined over in the app folder there's

play03:23

also some additional non- routing code

play03:25

shared code located in the code folder

play03:28

you can change that to source if you

play03:30

want to I don't particularly like the

play03:31

word code in this case I wouldn't do

play03:33

Source but code is what you'll get if

play03:35

you do the full stack starter so there's

play03:37

the config folder and it just holds the

play03:39

tamagi config we'll take a look at that

play03:40

more in detail in a bit there's also a

play03:42

public folder which has the public

play03:44

Assets in my app there's also an uploads

play03:47

folder inside of that where the uploaded

play03:49

pictures go and there's also a photos

play03:52

Json file with my files based database

play03:55

as opposed to that postris stuff there's

play03:57

a few more things on the top level

play03:58

there's an app. Jon that has the Expo

play04:01

configuration for the native app there's

play04:03

a biome dojon that defines like linting

play04:05

and formatting specifications and then

play04:08

there's a react native config which has

play04:09

the setup for vxn now VX RN is a

play04:13

critical piece of the infrastructure

play04:15

here so one is built on top of vit and

play04:19

vxr N is the bridge from vit to react

play04:23

native land and gives you a platform for

play04:26

both web and react native from the same

play04:29

code codebase so if you're looking for

play04:31

that shared codebase idea but you don't

play04:33

think that one has quite the right

play04:35

structure for you then maybe you could

play04:37

use vxr as a starting point and build

play04:40

whatever you want to on top of that then

play04:42

they got a TS config for typescript it's

play04:44

the usual stuff although they do add a

play04:45

path for TIY which gets you to the top

play04:48

of the project so you can use that in

play04:49

your Imports and then for the V config

play04:51

we bring in both one and the tagui

play04:53

configurations now notable here is the

play04:56

default render mode which is set to SSG

play04:59

or static site generation which means

play05:01

that by default all of the routes in

play05:03

your app will be compiled and cached at

play05:06

build time but we'll get into that when

play05:07

you talk about routing in the meantime I

play05:10

hope you're enjoying this new faster

play05:11

format if you are let me know in the

play05:13

comments and speaking of fast if you

play05:15

want to get into react native super fast

play05:17

you should check out this week's partner

play05:19

infinite red infinite red is the OG

play05:21

react native consultancy they are react

play05:24

native experts and they've been an

play05:26

integral part of the react native

play05:28

Community from the very start and they

play05:30

work with some of the biggest brands out

play05:32

there Domino's merari Zoom Zoom Care and

play05:35

many more these companies trust their

play05:38

expertise with react native and I do too

play05:41

whenever I get a question about react

play05:43

native I hit up my friends over to

play05:45

infinite red and they've always helped

play05:47

me work through my issues and they can

play05:49

do the same for you infinite Red's also

play05:51

Super Active in the community each year

play05:53

they run a chain react conference right

play05:55

here in Portland Oregon I had the honor

play05:58

of speaking there last year about how to

play05:59

use react native with AI and not only

play06:02

did they help me get that app running

play06:04

they also have an open source AI for

play06:08

react native project that they sponsor

play06:10

as well as the OSS ignite framework that

play06:13

makes it super easy to scaffold out your

play06:16

react native app so if you're looking

play06:18

for react native consultancy look no

play06:20

further than my friends over at infinite

play06:22

red thank you guys so much for

play06:25

supporting this Channel all right let's

play06:26

talk about routing now before I get into

play06:28

the specific mechanics it's important to

play06:30

know that this is not a web app running

play06:33

in a web view on Native one handles web

play06:36

routing and building Pages for web and

play06:39

on mobile it's doing the native routing

play06:41

and the native rendering using react

play06:44

native that's why you need something

play06:46

like tagui as well because you want that

play06:49

one set of component Primitives that

play06:51

work across web and Native all right so

play06:54

one is a file-based router which means

play06:56

that the organization of the files and

play06:58

the folders in that app directory

play07:01

defines the structure of the routes for

play07:04

example the about. TSX file at the top

play07:07

level here is slab on web if you click

play07:11

on a photo you go to The Details page

play07:13

for it so that's

play07:16

sloid and that's in this photos route

play07:18

group and then within that photo as a

play07:21

folder and then within that the brackets

play07:23

ID that indicates a parameterized route

play07:26

now there's also plus SSR which we'll

play07:28

get to in a second second so the

play07:30

structure of the files and the folders

play07:32

in that directory is the structure of

play07:35

the routes and this isn't really

play07:37

anything unusual nextjs remix tan stack

play07:40

router they all support file-based

play07:42

routing but of course they use different

play07:45

syntaxes for it this one's actually very

play07:48

similar to nextjs so now we know how

play07:50

stuff is laid out let's talk about the

play07:51

different types of routes that one

play07:53

supports there is the default which is a

play07:56

static route and that gets built at

play07:58

build time and it's f fix in my app the

play08:01

photos app the only page that's static

play08:03

is the about page then there's a server

play08:05

side rendered route or SSR route that's

play08:09

a route that's rendered dynamically on

play08:11

each request and you specify that using

play08:13

plus SSR as part of the file name on the

play08:16

route the homepage for example which is

play08:19

inside that photo's route group is SSR

play08:21

so it has that plus SSR every time you

play08:24

request home it goes and gets the photos

play08:25

and it renders out a new page now the

play08:28

route group thing with the parentheses

play08:29

is a little weird the first time I saw

play08:30

this was with the nextjs app router

play08:32

basically a route group is an

play08:34

organizational way to hold a bunch of

play08:36

related routes together but the route

play08:38

group name itself in this case photos in

play08:42

this case doesn't appear in the URL so

play08:45

you might think with this structure you

play08:46

get sloto sloto but it's just sloto so

play08:50

moving on there's spa or spa or single

play08:53

page application pages in this case our

play08:56

upload page is a spa page now these

play08:59

pages aren't server side rendered

play09:00

they're only client side rendered so for

play09:03

an upload form it just makes sense for

play09:04

it to be a spa page and then finally

play09:06

there's API routes in this case the

play09:08

upload Handler that's called from the

play09:10

upload page when you upload a new image

play09:12

is an API route for an API route you

play09:15

export functions that match the HTTP

play09:18

method names like in this case an all

play09:20

uppercase post will get you a post

play09:23

Handler and then you get a request as

play09:26

input and you

play09:27

do whatever process you want to do in

play09:30

this case I'm storing the uploaded file

play09:32

and at the end you return whatever Json

play09:35

you want to send back this is actually a

play09:37

pretty popular way of doing API routes

play09:39

now and I I I like it for react routes

play09:43

so SSR SSG and Spa routes the module for

play09:48

that page needs to return a default

play09:50

export and that's going to be the

play09:51

rendering component like my about route

play09:54

here that just returns a component that

play09:55

has the about page in it there's also

play09:58

special name component like this

play09:59

underscore layout that wraps the routes

play10:02

you can see that the top level layout

play10:04

that includes the metadata when you're

play10:06

in web mode so this is web flag your

play10:09

code is a way to include or exclude code

play10:12

specifically for web or native that's

play10:14

just one way to do it that layout also

play10:16

has providers and in this case tomag GOI

play10:18

and theme providers so layouts can also

play10:21

be nested so in this case in that photos

play10:24

group for either the homepage or the

play10:26

photo details route then the layout

play10:28

that's in there will be nested inside of

play10:30

the parent layout at the top level all

play10:33

right so that's routing with one let's

play10:34

talk about how to do data loading

play10:36

because when you render a page we're

play10:37

going to want some data probably to

play10:39

render so let's have a look over at the

play10:41

about page it's an SSG route because

play10:44

that's the default and we haven't

play10:45

specified a type and it has a loader

play10:48

function in it now that loader function

play10:50

in this case is run at build time and it

play10:52

sends back this little bit of data back

play10:54

to the component that uses the use

play10:57

loader hook to get access to that data

play10:59

now let's check out the SSR rep for the

play11:01

homepage here we're loading all of the

play11:03

photos in this case we our file but you

play11:05

could do it from a database if you want

play11:06

and then passing them on to the page

play11:09

through that used loader and then on the

play11:11

photo Details page we get the ID

play11:13

parameter which is specified in the file

play11:15

name in the loader function and then we

play11:18

use that to load the data for the

play11:20

specific photo and then we send that

play11:22

along to the page for rendering again

play11:24

through use loader so this loader

play11:26

architecture is pretty standard for

play11:28

these full stack Frameworks it's in

play11:31

tanack remix the nextjs pages router but

play11:36

it's unlike the nextjs app router that

play11:39

uses react server components or rsc's to

play11:43

load and render the data I actually

play11:45

think that's going to be a big

play11:45

differentiating feature between these

play11:47

Frameworks coming up some that are doing

play11:49

the loader stuff and others that are

play11:50

doing the RSC stuff all right now let's

play11:52

talk about components and responsive

play11:53

layout my recommendation in this case is

play11:56

if you're going to use one then use

play11:58

tomag GOI for the components it's

play12:00

clearly the component library from the

play12:03

framer Creator and it comes

play12:05

pre-installed if you request that and

play12:07

it's also crossplatform between react

play12:10

native and react web and honestly it's a

play12:14

good component set it's got pretty much

play12:16

everything you're going to need it's got

play12:18

buttons inputs labels dialogues toasts

play12:23

all that stuff plus it's themeable so if

play12:26

you don't like the look you can change

play12:27

it so for crossplatform layout tagui

play12:29

supports three different components

play12:32

there's xstack y stack and zstack xstack

play12:36

and Y stack are basically the ones that

play12:37

you'll be using most often so on the web

play12:40

xstack is a flexbox in row mode and Y

play12:44

stack is a flexbox in colum mode and

play12:46

that's emulated over native to give you

play12:49

the exact same layout you can also use

play12:51

Tailwind style shorthand like mt for

play12:54

margin top or PX for padding on the left

play12:58

and right side in this case we're using

play13:00

attributes instead of class names you

play13:02

can also have platform specific styles

play13:04

by using the dollar platform attribute

play13:06

so here we're using dollar platform

play13:07

native and saying that on Native we want

play13:10

100 pixels of padding on the top you can

play13:12

also use IOS and Android in there if you

play13:14

want to be really specific about what

play13:17

platform you want the default in this

play13:19

case would be web one more thing you can

play13:21

also add custom breakpoints so I added

play13:24

small medium and large to my tamagi

play13:27

configuration and then over on the

play13:28

homepage P you can see where I set the

play13:30

cards to 50% width at the medium break

play13:33

point and that actually works on both

play13:36

web and Native so you get that nice

play13:38

wrapping effect finally sometimes you're

play13:40

going to want native only code and code

play13:42

that is just for iOS or Android and one

play13:45

has a really elegant solution for that

play13:47

let's look over my camera component here

play13:49

I've got two files so we got index. TSX

play13:52

that's the web version and the default

play13:55

and then also index. native. TSX and

play13:58

that's for native of course you could

play14:00

also use IOS and Android if you wanted

play14:02

to be very specific about it the

play14:04

important part is that the exported

play14:06

components need to have the same

play14:08

signature so I put these two files side

play14:10

by side you can see that the default

play14:12

exported component in this case camera

play14:14

button has the same signature across

play14:17

both the web and the native versions

play14:19

then over on the import side I just

play14:20

import it as I usually would and One

play14:23

automatically handles switching between

play14:25

which is built for which bundle now this

play14:28

matches the standard for react native

play14:30

but the one folks have actually ported

play14:31

this over to this V setup all right so

play14:34

now that we know more about one let's

play14:35

talk about some pros and cons and I'll

play14:36

first start off with the cons and I

play14:39

think the biggest one is at this point

play14:41

stability it's it's a pretty early beta

play14:43

for this so I got to say it's it's still

play14:46

pretty shaky so if you buy in you got to

play14:49

be ready for some pretty choppy going at

play14:52

least at first the other con for me is

play14:54

that not all libraries are compatible

play14:56

with this and you can see what I mean

play14:57

when you run yarn Dev it's actually

play14:59

right at the top there patching a bunch

play15:00

of libraries to get them to play nice

play15:03

with one and that includes big libraries

play15:06

like react and react Dom and V and

play15:09

rollup and what that means is that it's

play15:12

actually going in and tweaking the code

play15:15

in those libraries to get them to work

play15:17

with one and you can imagine that if

play15:20

that doesn't happen then one doesn't

play15:22

work so that's a problem now for what

play15:24

it's worth I was working with the one

play15:25

framework folks as I developed this

play15:27

video and Expo cam which is what I

play15:29

needed in my app is in there

play15:31

specifically because I used that library

play15:35

and I was running into issues with it

play15:37

and so they fixed it so as you're trying

play15:39

out new libraries you might run into

play15:41

issues like that and need that kind of

play15:43

patching now the good news is that the

play15:45

team is really super responsive and

play15:48

they'll get those fixes done now on the

play15:51

proos side there is a lot to like about

play15:54

one it's it's genuinely delivering on

play15:56

the promise of react when we first got

play15:59

act native one code base to build for

play16:02

both web and mobile was the ideal and

play16:05

here it is and it's not just shared

play16:08

State Management or API layers I mean

play16:10

it's the full app and I got to tell you

play16:12

it feels more fluid to develop than what

play16:14

I would have thought I was really

play16:16

worried that it would feel clunky but it

play16:18

it genuinely doesn't also importantly

play16:21

one doesn't paint you into any

play16:23

architectural Corners tomag GOI the

play16:26

underlying component library is

play16:27

compatible with next and and with stock

play16:30

react native applications so you could

play16:34

take that code that you write in one and

play16:36

if it doesn't work for you you could

play16:38

refactor that into a monor repo with

play16:41

shared libraries and use that code in a

play16:43

next app with tagui and then a react

play16:46

native app and that would all work fine

play16:49

so I was building a startup and I had

play16:50

just myself or a very small team and I

play16:53

wanted to quickly put together a full

play16:55

web and Native experience I'd be looking

play16:59

really seriously at one it's got

play17:01

everything you need I also think it

play17:03

would make a great proof of concept

play17:04

framework when you're working at larger

play17:06

companies and you just want to show an

play17:07

idea but also have it working everywhere

play17:10

all right I hope you enjoyed looking at

play17:11

this awesome new one framework let me

play17:12

know in the comments right down below if

play17:14

you're going to give this a try of

play17:15

course a huge thank you again to this

play17:17

week's sponsor infinite red and if you

play17:19

don't know already we have our own

play17:21

podcast now frontend fire there's a link

play17:24

in the description right down below

play17:25

every week me and my co-host TJ van told

play17:29

and Page neering House breakdown the

play17:31

week's top frontend stories we've got a

play17:34

weekly game and we talk about the cool

play17:36

stuff making us happy every week it's

play17:38

super fun come over and check it out

play17:41

also if you're into full stack

play17:41

development check out my new course on

play17:43

nextjs proex js. Deb I go into depths

play17:46

with the app writer that you will see in

play17:47

no other course in the meantime if you

play17:50

like this video be sure to hit that like

play17:52

button if you really like the video hit

play17:53

the Subscribe button and click on that

play17:54

Bell and be notified the next time a new

play17:57

blue collar coder comes out

Rate This
โ˜…
โ˜…
โ˜…
โ˜…
โ˜…

5.0 / 5 (0 votes)

Related Tags
React DevelopmentFull StackReact NativeWeb AppsMobile AppsComponent LibraryRouting MechanicsCross-PlatformTech ReviewDevelopment ToolsFramework Comparison