multiple features
Hi is it possible to create multiple pages for custom features with this boilerplate? Couldn’t acces internet so trying to figure out through this way. Thanks alot
24 Replies
Hi @Sven. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Yes, it is possible to create multiple pages for custom features with Wasp. You can add more pages by creating another set of page and route declarations. Here is an example of how to add a new page:
When a user visits
/hello/their-name
, Wasp will render the component exported from src/HelloPage.tsx
and pass the URL parameter the same way as in React Router:
You can visit /hello/johnny
and see "Here's johnny!".
For more details, you can refer to the Wasp documentation (https://wasp-lang.dev/docs/tutorial/pages#adding-a-second-page).
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Sven, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?Ahhh cool
How would i learn more about jsx and tsx to make such pages?
The best thing I’ve done is watch YouTube videos.
Params can be very powerful when used correctly
Do you have some links
Any React tutorial will be okay, JSX / TSX as keywords help. These tutorials are usually related to using React outside of Wasp so you'll need to slightly adjust what you learn but ever so slightly becauase Wasp is using good old React, and no special syntax. For example: https://www.youtube.com/watch?v=xTVQZ46wc28
Dave Gray
YouTube
React Typescript Tutorial for Beginners
Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap
In this React Typescript Tutorial for beginners you will learn about function components, passing props, default values, passing setState, and all of the associated TS types and return types. React + Typescript!
🚀 Become a full-stack web dev with Zero To Mastery Course...
alright nice is this boilerpalte suited for like "bigger" projects. Planning on building something big
have a good experience in different coding languages and frameworks btw
what would be recommended to use JS or TS?
@Vinny (@Wasp) I'll let you answer this bit
alright ill try
TS all the way in my opinion, it's not that harder but gets a lot of benefits by catching potential bugs for you
yeah true
object oriented is better too imo
how do i install wasp on my windows machine
Have you checked the Wasp docs? https://wasp-lang.dev/docs
Introduction | Wasp
If you are looking for the installation instructions, check out the Quick Start section.
yes
but i dont understand the scentence
To install Wasp on Linux / OSX / WSL (Windows), open your terminal and run:
Boris wrote this great post on the topic of installing Wasp on Windows (WSL2): https://dev.to/wasp/supercharge-your-windows-development-the-ultimate-guide-to-wsl-195m
DEV Community
Supercharge your Windows Development: The Ultimate Guide to WSL 🚀📟
Hi! I’m Boris! I’m a software engineer working professionally in insurance, teaching other...
but do i need to code in a linux env or something then
Please read the article 🙂 it will clear up things in much better way than I can in a few short messages
I agree TS all the way
It depends on what you OS you are using. For windows you handle all commands and such in the WSL2 (Windows Subsystem for Linux) environment. But you can still use your normal windows environment for vscode and just navigate to the project
my .wasp file doesnt have like an icon
is that correct
Did you install the extension?
yep
if i dont need speicifc tables like task table i can remove them from prisma file and migrate?
mine does
yup
@kapa.ai I want to style my app page using chakra, what is the best way of doing this? I want to create an application UI with a sidebar
Let me check the knowledge base for you. One moment! :books:
----------------------
To style your app page using Chakra, you can wrap your top-level React component with the
ChakraProvider
component. This was suggested in a Github issue (https://github.com/wasp-lang/wasp/issues/77) related to Wasp. Here's an example:
In this example, children
would be the components of your app. If you want to create a UI with a sidebar, you would include your sidebar component and main content component as children of the App
component.
Please note that this is a general approach and might need to be adjusted based on your specific needs and the structure of your project. Also, this feature is not yet officially supported in Wasp, but it's being considered for future updates.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Sven, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?clear
Wohooo @Sven, you just became a Waspeteer level 4!