create-expo-stack icon indicating copy to clipboard operation
create-expo-stack copied to clipboard

Adding State Management Options to CLI

Open theblondealex opened this issue 1 year ago • 7 comments

Description

I had added state management options to the ces flow

  • Initially I have only added Zustand but with the approval of this PR I will look into adding other optons too
  • Adds a question on the flow (see image)
  • Adds a --zustand flag to skip the question too. This creates a folder in the root directory called state management with a default store from the zustand docs, it could be updated in future with a more generic store and some comments on how to use but to start with its the default store from zustand docs

Motivation and Context

My motivation was as I believe that ces can and should become one of the best and number one go to option for starting new RN expo apps and state management is mandatory in almost every app asit scales and having the setup from the get go is a must, as well as this the intuitive nature of ces means that for beginner RN devs they can use it and this will ease them into state management, in short ces should have eveything you could need, state management is one such item

Screenshots (if appropriate):

image

theblondealex avatar May 02 '24 11:05 theblondealex

🦋 Changeset detected

Latest commit: 49216ffdfdbca3b02d3907a250182eb9480b512a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-expo-stack Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar May 02 '24 11:05 changeset-bot[bot]

@theblondealex is attempting to deploy a commit to the ronin-tech Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar May 02 '24 11:05 vercel[bot]

@theblondealex Will explore adding this to the CLI once I move NativeWindUI to the styles section, aiming to do so this weekend.

danstepanov avatar May 16 '24 19:05 danstepanov

@theblondealex planning to review this for the next version of CES (next week)

danstepanov avatar Jun 17 '24 19:06 danstepanov

I really wish to see this in the CLI

Avaray avatar Jun 22 '24 20:06 Avaray

Just updated it to resolve some conflicts with the recent main branch push

theblondealex avatar Jun 24 '24 17:06 theblondealex

Have you tested this while also using 'react-native-mmkv' ? Having a hard time finding examples of this setup and even more so if including @tanstack-query.

HunterSides avatar Jul 03 '24 19:07 HunterSides

Have you tested this while also using 'react-native-mmkv' ? Having a hard time finding examples of this setup and even more so if including @TanStack-Query.

Those are separate packages to zustand and aren't exactly state managers so most likely wouldnt be in here IMO, this is the Redux/zustand type packages

theblondealex avatar Oct 27 '24 23:10 theblondealex

Hey sorry that its taken a while but I will be looking to get things moving on the state management templates and will be taking a look at this pr soon with the aim to move forward and get it merged.

dannyhw avatar Oct 30 '24 00:10 dannyhw