Giter Club home page Giter Club logo

reactivities-v6's People

Contributors

trycatchlearn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reactivities-v6's Issues

Mobx vs React-Query

Hi and thanks for the time and effort on the course.
I got a question, what happens if we switch to react-query for caching the server data and context for our few client-side states?
Wouldn't some state management library like Mobx seem redundant in that case?

Submit button not working

The onSubmit functionality for the form has no response when you run the app

This is from the ActivityForm.tsx

<Segment clearing>
<Form onSubmit={handleSubmit} autoComplete='off' >
<Form.Input placeholder='Title' value={activity.title} name ='title' onChange={hanldeInputChange}/>
<Form.TextArea placeholder='Description' value={activity.description} name='description' onChange={hanldeInputChange} />
<Form.Input placeholder='Category' value={activity.category} name='category' onChange={hanldeInputChange} />
<Form.Input type = 'date' placeholder='Date' value={activity.date} name='date' onChange={hanldeInputChange} />
<Form.Input placeholder='City' value={activity.city} name='city' onChange={hanldeInputChange}/>
<Form.Input placeholder='Venue' value={activity.venue} name='venue' onChange={hanldeInputChange}/>
<Button type='submit' loading = {submitting} floated = 'right' positive content = 'Submit' />
<Button onClick={closeForm} floated = 'right' type='button' content = 'Cancel' />
</Form>
</Segment>

Possible issue on ActivityForm when loading /create-activity from page load rather than navigating through app.

I'm only up to the end of section 8 - Routing, however I've found an issue when going to the /create-activity route from the initial page load, rather than being redirected from another route.

The issue is that the 'Loading' screen stays for ever, and doesn't go away. The fix seems pretty simple, all we need to do is set the loadingInitial = false if there is no id.

In the ActivityForm.tsx file, make the following change to the useEffect hook and the *activityStore deconstructor:

const {createActvity, updateActivity, loading, loadActivity, loadingInitial, setLoadingInitial} = activityStore;

...

useEffect(() => {
		if (id) {
			loadActivity(id).then(activity => setActivity(activity!));
		} else {
			setLoadingInitial(false);
		}
	}, [id, loadActivity, setLoadingInitial])

As mentioned initially, I have't actually finished the course yet, so if this is picked up and fixed in a later section, then happy days, however looking the source files on git, this doesn't seem to be immediately apparent.

Great course so far!

Cheers,
Justin

problem with meta.touched and MyDateInput.tsx

Thanks for the course. I'm still working my way through it. I noticed an issue working with the date picker. meta.touched is used to limit showing an error state until after the user has had a chance to change the field or submit the form. However I find it doesn't show the error status in one scenario:

  • Starting with the activity form loading an existing activity
  • Select the date text and delete it. Don't touch the actual date picker control.
  • Click some other field
  • Observe that no error status is shown for the empty date field.
  • Expected result is that the background color gets highlighted and the error text tells the user about a problem with the date.

I was going to see if I could repro the issue with your repro, but couldn't even get it to run. It looks like its setup to run postgres, I'm not there yet. I kind of assumed the final project would still run against SQLite for development mode. I tried changing the connection string to "DefaultConnection": "Data source=database.db" but that wasn't enough.

Create test

I randomly came across you and your project, and I learned a lot from your codes. Thank you for that
Can you write a sample test for the ActivitiesController file?

No overload matches createBrowserHistory

No overload matches in line 18
Overload 1 of 2, '(props: RouterProps | Readonly): Router', gave the following error.
Type 'BrowserHistory' is missing the following properties from type 'History': length, goBack, goForward
Overload 2 of 2, '(props: RouterProps, context: any): Router', gave the following error.
Type 'BrowserHistory' is not assignable to type 'History'.

ReactDOM.render(
<StoreContext.Provider value={store}>
/*18 */ <Router history={history}>


</StoreContext.Provider>,
document.getElementById('root')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.