Ooker
What makes a selector being clickable on browser, but not on runtime?
I'm trying to click the "What's on your mind" input on a Facebook user profile. I can do that in the browser:
However, the element returns
null
when I use @astral/astral on Deno (the browser is logged in already):
Why is that?2 replies
Why does `res.text()` not work inside `useEffect()`?
On
islands/test.tsx
I have:
The data returns fine in the server's console (the part outside the useEffect()
hook), but it doesn't show up in the client's console. However if I change the fetch
function to:
then it shows on both sides. Why is that the case?
(Also asked on Stack Overflow).7 replies
The deployment failed: Relative import path "$fresh/server.ts" not prefixed with / or ./ or ../
When deploying I get this error:
A person who had the same error on their machine solves this by adding this to the import map:
This doesn't work on my case. In my understanding this shouldn't be an issue at all. Do you know why is that?
Background
My fresh project is under some sub-folder from the root. The structure is like this:
deno.json
7 replies
How to send data from a child component to its sibling?
I want create an app with two forms, each form in its own component. Users type in form 1, then the data will be passed to component 2. In there it will join the data of what they type in form 2. How can I do this?
Below is the code on my machine, taken from the answer from the same question in Stack Overflow. It works when using React on Stackblitz but I don't get why it's not in my machine:
index.jsx
Context.js
Form1.jsx
Form2.jsx
The app compiles fine, but the actual result is empty.7 replies
JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements'
I have a core program, and from that I have auxiliary components: test, web app, cli app. Initially I worked on the core + cli app + test, then recently I work on the web app with Fresh. At first I separate the project to learn the framework easier, but now I want to join them together, so that I can debug the core easier. Now every component has this problem:
I've tried restarted VS Code but it doesn't help. Here are some related files:
.vscode/setting.json
aux/web/deno.json
9 replies
How to pass value from one form to another?
I want to design a form which has two input text field. What users type in field 1 will be passed to field 2. How can I do this in Deno Fresh?
Here is the current code, suggested from https://discord.com/channels/684898665143206084/991511118524715139/1194335634228256828
routes/index.tsx
:
islands/form.tsx
:
It returns empty to me. Any idea?3 replies
How does form submission work?
I'm following the tutorial: https://fresh.deno.dev/docs/getting-started/form-submissions
It says:
When the user submits the form, the browser will navigate to/search
with the query set as theq
query parameter in the URL. TheGET
handler will then filter the names array based on the query, and pass it to the page component for rendering.
26 replies
Connection refused when creating a local API server
I'm following Simple API server | Deno Docs:
1. Create
server.ts
:
2. Run deno run -A --unstable server.ts
. The site says "Please provide a slug"
3. Run:
I get this error:
Searching for the error, I think I need to replace localhost
with 127.0.0.1
:
This doesn't help either.
In my understanding, it should return
Do you know what goes wrong?
(Also asked on Stack OVerflow)7 replies