-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: Solid quickstart guide addition #564
doc: Solid quickstart guide addition #564
Conversation
Co-authored-by: Damodar Lohani <lohanidamodar@users.noreply.github.com>
Co-authored-by: Damodar Lohani <lohanidamodar@users.noreply.github.com>
Create The-evolution-of-team-Appwrite
Co-authored-by: Jake Barnby <jakeb994@gmail.com>
Co-authored-by: Jake Barnby <jakeb994@gmail.com>
Co-authored-by: Jake Barnby <jakeb994@gmail.com> Co-authored-by: Damodar Lohani <lohanidamodar@users.noreply.github.com>
Removes browser check
Co-authored-by: Jake Barnby <jakeb994@gmail.com>
Co-authored-by: Damodar Lohani <lohanidamodar@users.noreply.github.com>
Feat server sdks quickstarts
Fix syntax errors in Flutter quick start
I'm gonna get to this as soon as our release chaos is over <3 Thanks Josh! |
Create a new file `src/lib/appwrite.js` and add the following code to it, replace `<YOUR_PROJECT_ID>` with your project ID. | ||
|
||
```js | ||
import { Client, Account} from 'appwrite'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { Client, Account} from 'appwrite'; | |
import { Client, Account } from 'appwrite'; |
.setProject('<YOUR_PROJECT_ID>'); // Replace with your project ID | ||
|
||
export const account = new Account(client); | ||
export { ID } from 'appwrite'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to re-export ID, I'd say
const [email, setEmail] = createSignal(''); | ||
const [password, setPassword] = createSignal(''); | ||
const [name, setName] = createSignal(''); | ||
|
||
async function login(email, password) { | ||
await account.createEmailSession(email, password); | ||
setLoggedInUser(await account.get()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use formData instead of signals? Would make code leaner overall.
setLoggedInUser(null); | ||
}} | ||
> | ||
Logout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This button should only be visible if there's a logged in user. Likewise, the form should only exist in case there's no logged in user
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @TGlide
Thanks so much for these comments. I agree with them and will get working on the updates.
I didn't want to deviate too far from the React code which is why I made a lot of the decisions in the quick start, just with "Solid" syntax.
But if you're fine with adding those changes to this quick start and having it deviate a bit from the React version, I'm all for it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take this forward! Need to add the icon to pink later :)
Hey @joshcirre The new conditional rendering logic is actually not reactive. Should we do <Show
when={loggedIn()}
fallback={
// logout
}
>
// login
</Show> instead? |
Merging this into a branch to resolve merge request :) |
What does this PR do?
Using the existing quick starts as a guide, this PR adds a quick start for the Solid framework in the same format. Additionally, this PR adds a Solid logo to the aw-icon pack using the SVG from the Solid media assets.
Related PRs and Issues
No related PRs or Issues that I could see. 😊
Have you read the Contributing Guidelines on issues?
Yes, I have.