create-expo-stack
create-expo-stack copied to clipboard
Adding State Management Options to CLI
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):
🦋 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
@theblondealex is attempting to deploy a commit to the ronin-tech Team on Vercel.
A member of the Team first needs to authorize it.
@theblondealex Will explore adding this to the CLI once I move NativeWindUI to the styles section, aiming to do so this weekend.
@theblondealex planning to review this for the next version of CES (next week)
I really wish to see this in the CLI
Just updated it to resolve some conflicts with the recent main branch push
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.
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
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.