Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More built-in components and features? #327

Closed
likeSo opened this issue Jan 24, 2021 · 6 comments
Closed

More built-in components and features? #327

likeSo opened this issue Jan 24, 2021 · 6 comments

Comments

@likeSo
Copy link

likeSo commented Jan 24, 2021

Introduction

We know make components in React-Native is very easy, but if React-Native provides more common components, that is more convenient for developers!

Details

The most commonly used components

  • Spacer: A View component with a flexGrow style;
  • SizedBox: A View component with a width and height style, used for custom spacing in flex;
  • Divider: A View component with a width or height style;
  • Drawer: CROSS-PLATFORM DRAWER, A built-in drawer is sooooo great!
  • Dialogs: For now, the only option to build a dialog, is Modal, but what if I want to make it more easily? What if I want to make multiple dialogs at the same time? Should I write a lot of Modal component on every my screen?
  • Bottom Sheet: -
  • Shapes: Circles, Triangles, and Even More;

About React Navigation

When I create a new project, the first thing I should thinking is that HOW to structure my app, Tab Navigator or Stack Navigator?
For now, the structure of my app looks like below:

  • Stack Navigator (with mode 'modal')
    • StackNavigator
      • LoginScreen
      • RegisterScreen
    • StackNavigator
      • TabNavigator(with options: headerShown: false)
        • StackNavigator(just use for display header)
          • HomepageScreen
        • StackNavigator(just use for display header)
          • AccountScreen
      • DetailScreen
      • OtherScreen

And once I login succeeds, I push to HomepageScreen. Could we do something about this? PLEASE SAVE me from this!
Could we provide a way that sounds like Scaffold(Yes it came from Flutter), it can display the bottom bar, navigation bar even toolbar?

And by the way, how can I clear all Previous Screen, and navigate to a new Screen?😂 Thank you very much!

Discussion points

React-Native is great and beautiful, but we need More Convenient ways to build applications.

@hsavit1
Copy link

hsavit1 commented Jan 24, 2021

I agree that the default screens on project inits could be more developer friendly. If react-navigation is the de-facto navigation solution, then we should see it used when a new project is initialized.

@likeSo
Copy link
Author

likeSo commented Jan 25, 2021

I agree that the default screens on project inits could be more developer friendly. If react-navigation is the de-facto navigation solution, then we should see it used when a new project is initialized.

Thank you, Yes we need a more developer-friendly way to develop!
For a new project, I have to create a folder for these components such as <Spacer />, <Divider /> and <SizedBox />.
For app architecture, I have to place A LOT of Navigators into my project, that's terrible...

@likeSo
Copy link
Author

likeSo commented Jan 25, 2021

Additional Feature Requests:

  • Support input-formatters or filters on TextInput;

@kelset
Copy link
Member

kelset commented Jan 25, 2021

Hey - thanks for the feedback but this is directly against the direction the repo has been going with the Lean Core effort.

And even lately, there has been discussions to detach "core" react-native packages (see here), so I'm sorry but I don't see your list of requested components making it into core.

@kelset kelset closed this as completed Jan 25, 2021
@elicwhite
Copy link

To add to what @kelset mentioned, there are many React Native UI toolkits in the community that include these kinds of things. We'd like to continue fostering development of these toolkits, which requires enabling competition. If we try to include these things in core, we'd be hurting the opportunities of these other toolkits, leading to an actually worse experience for the community.

@AndreiCalazans
Copy link

What you request is already avaiable with Expo. I suggest you take a look at the Expo "bare" workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants