You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some components accept CSS as props instead of className
Timing logic is hard coded
My suggestions are as follows:
Use React Context to avoid prop drilling (can be implemented for meetup details as well as templates). The code will be cleaner and more maintainable.
Loop in the TEMPLATE_CONFIGS object to display each template option.
Rewrite/Remove these components as needed. CSS should be passed as className. Data should be passed as props.
The timing logic has to be dynamic and magic numbers should be avoided. We can name variables/constants properly to ease readability. Each template config can have a timing calculator function that takes the meetup details as argument.
Other improvements:
Move DefaultTemplate from src/templates to src/components as IMHO src/templates should contain only template components.
Rename DefaultTemplate to DynamicTemplate.
Rename the meetup parameter at src/components/Root.tsx on line 54 to meetupDetails.
Move Root from src/components to src as src/components should contain reusable components.
Rename Root to App to match React project conventions.
Create an interface for TEMPLATE_CONFIGS objects to ensure type safety while adding/modifying TEMPLATE_CONFIGS.
Modify instructions in the README.
The text was updated successfully, but these errors were encountered:
The current code has the following issues:
My suggestions are as follows:
Other improvements:
src/templates
tosrc/components
as IMHOsrc/templates
should contain only template components.src/components/Root.tsx
on line 54 to meetupDetails.src/components
tosrc
assrc/components
should contain reusable components.The text was updated successfully, but these errors were encountered: